Skip to content

Commit c336c8a

Browse files
committed
Allow ESLint to do its thing.
1 parent 27f7d41 commit c336c8a

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

backbone.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
// Establish the root object, `window` (`self`) in the browser, or `global` on the server.
1111
// We use `self` instead of `window` for `WebWorker` support.
12-
var root = (typeof self == 'object' && self.self === self && self) ||
13-
(typeof global == 'object' && global.global === global && global);
12+
var root = typeof self == 'object' && self.self === self && self ||
13+
typeof global == 'object' && global.global === global && global;
1414

1515
// Set up Backbone appropriately for the environment. Start with AMD.
1616
if (typeof define === 'function' && define.amd) {
@@ -28,7 +28,7 @@
2828

2929
// Finally, as a browser global.
3030
} else {
31-
root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
31+
root.Backbone = factory(root, {}, root._, root.jQuery || root.Zepto || root.ender || root.$);
3232
}
3333

3434
})(function(root, Backbone, _, $) {
@@ -654,7 +654,7 @@
654654
// Set temporary attributes if `{wait: true}` to properly find new ids.
655655
if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);
656656

657-
var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
657+
var method = this.isNew() ? 'create' : options.patch ? 'patch' : 'update';
658658
if (method === 'patch' && !options.attrs) options.attrs = attrs;
659659
var xhr = this.sync(method, this, options);
660660

@@ -1500,19 +1500,19 @@
15001500
// 90% of the core usefulness of Backbone Collections is actually implemented
15011501
// right here:
15021502
var collectionMethods = {forEach: 3, each: 3, map: 3, collect: 3, reduce: 0,
1503-
foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,
1504-
select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,
1505-
contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,
1506-
head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,
1507-
without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,
1508-
isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,
1509-
sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};
1503+
foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,
1504+
select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,
1505+
contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,
1506+
head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,
1507+
without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,
1508+
isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,
1509+
sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};
15101510

15111511

15121512
// Underscore methods that we want to implement on the Model, mapped to the
15131513
// number of arguments they take.
15141514
var modelMethods = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,
1515-
omit: 0, chain: 1, isEmpty: 1};
1515+
omit: 0, chain: 1, isEmpty: 1};
15161516

15171517
// Mix in each Underscore method as a proxy to `Collection#models`.
15181518

@@ -1615,11 +1615,11 @@
16151615

16161616
// Map from CRUD to HTTP for our default `Backbone.sync` implementation.
16171617
var methodMap = {
1618-
'create': 'POST',
1619-
'update': 'PUT',
1620-
'patch': 'PATCH',
1621-
'delete': 'DELETE',
1622-
'read': 'GET'
1618+
create: 'POST',
1619+
update: 'PUT',
1620+
patch: 'PATCH',
1621+
delete: 'DELETE',
1622+
read: 'GET'
16231623
};
16241624

16251625
// Set the default implementation of `Backbone.ajax` to proxy through to `$`.
@@ -1712,11 +1712,11 @@
17121712
// against the current location hash.
17131713
_routeToRegExp: function(route) {
17141714
route = route.replace(escapeRegExp, '\\$&')
1715-
.replace(optionalParam, '(?:$1)?')
1716-
.replace(namedParam, function(match, optional) {
1717-
return optional ? match : '([^/?]+)';
1718-
})
1719-
.replace(splatParam, '([^?]*?)');
1715+
.replace(optionalParam, '(?:$1)?')
1716+
.replace(namedParam, function(match, optional) {
1717+
return optional ? match : '([^/?]+)';
1718+
})
1719+
.replace(splatParam, '([^?]*?)');
17201720
return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
17211721
},
17221722

0 commit comments

Comments
 (0)