Skip to content

Commit ee89123

Browse files
committed
remove trailing whitespace, fix two jshint warnings
1 parent 91ca3a0 commit ee89123

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/jsonselect.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
* optional array of values. When provided, they will be escaped and
1212
* inserted into the selector string properly escaped. i.e.:
1313
*
14-
* .match(':has(?)', [ 'foo' ], {})
15-
*
14+
* .match(':has(?)', [ 'foo' ], {})
15+
*
1616
* would result in the seclector ':has("foo")' being matched against {}.
1717
*
1818
* This feature makes dynamically generated selectors more readable.
@@ -26,9 +26,9 @@
2626
* .forEach(selector, [ values ], object, callback)
2727
*
2828
* Like match, but rather than returning an array, invokes the provided
29-
* callback once per match as the matches are discovered.
30-
*
31-
* .compile(selector, [ values ])
29+
* callback once per match as the matches are discovered.
30+
*
31+
* .compile(selector, [ values ])
3232
*
3333
* Parses the selector and compiles it to an internal form, and returns
3434
* an object which contains the compiled selector and has two properties:
@@ -37,7 +37,7 @@
3737
* use the compiled selector.
3838
*
3939
* For cases where a complex selector is repeatedly used, this method
40-
* should be faster as it will avoid recompiling the selector each time.
40+
* should be faster as it will avoid recompiling the selector each time.
4141
*/
4242
(function(exports) {
4343

@@ -110,7 +110,7 @@
110110
// (8) bogus JSON strings missing a trailing quote
111111
"(\\\")|" +
112112
// (9) identifiers (unquoted)
113-
"\\.((?:[_a-zA-Z]|[^\\0-\\0177]|\\\\[^\\r\\n\\f0-9a-fA-F])(?:[\$_a-zA-Z0-9\\-]|[^\\u0000-\\u0177]|(?:\\\\[^\\r\\n\\f0-9a-fA-F]))*)" +
113+
"\\.((?:[_a-zA-Z]|[^\\0-\\0177]|\\\\[^\\r\\n\\f0-9a-fA-F])(?:[\\$_a-zA-Z0-9\\-]|[^\\u0000-\\u0177]|(?:\\\\[^\\r\\n\\f0-9a-fA-F]))*)" +
114114
")"
115115
);
116116

@@ -140,7 +140,7 @@
140140
// skip and don't capture leading whitespace
141141
"^\\s*(?:" +
142142
// (1) simple vals
143-
"(true|false|null)|" +
143+
"(true|false|null)|" +
144144
// (2) numbers
145145
"(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|" +
146146
// (3) strings
@@ -256,7 +256,7 @@
256256
if (!nested) hints = {};
257257

258258
var a = [], am, readParen;
259-
if (!off) off = 0;
259+
if (!off) off = 0;
260260

261261
while (true) {
262262
var s = parse_selector(str, off, hints);
@@ -543,7 +543,7 @@
543543
});
544544
if (arr.length) throw "too many parameters supplied";
545545
return sel;
546-
}
546+
}
547547

548548
function compile(sel, arr) {
549549
if (arr) sel = format(sel, arr);
@@ -565,7 +565,7 @@
565565
return compile(sel, arr).match(obj);
566566
};
567567
exports.forEach = function(sel, arr, obj, fun) {
568-
if (!fun) { fun = obj; obj = arr; arr = undefined }
568+
if (!fun) { fun = obj; obj = arr; arr = undefined; }
569569
return compile(sel, arr).forEach(obj, fun);
570570
};
571571
exports.compile = compile;

0 commit comments

Comments
 (0)