forked from jshint/jshint
/
comma.js
31 lines (24 loc) · 909 Bytes
/
comma.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var _ref, count, starts, compact, last;
_ref = test, count = _ref.count, starts = _ref.starts, compact = _ref.compact, last = _ref.last;
var channels = [{ 'one': 'channel' }];
for ( var i = 0, channel, len = channels.length; channel = channels[i], i < len; i++ ) {
// Doing stuff
}
// !!
// see parser.js [exports.comma]
// comma operator breaks jshint...
// the next line should result in an error (parser or jshint)
func tion Model(data, block) {
// ...
}
Model.create = function(base, options) {
// If options is falsy, base wasn't provided so args need shuffling.
options || (options = base, base = Model); // <-- massive amount of JSHint complaining here!
console.log(base, options);
// ...
};
function gh56() {
var args = Array.prototype.slice.call( arguments );
args[0] = error( args[0] );
callback && callback.apply( commit, (args.push( commit ), args) );
}