Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wmertens committed Apr 2, 2017
1 parent 745f054 commit 52220c4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/jsurl2.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
function eat (a) {
var j, c
for (
var j = a.i;
j = a.i;
j < a.l && (c = a.s.charAt(j), c !== '~' && c !== ')');
j++
) {}
Expand Down Expand Up @@ -140,9 +140,8 @@
return out
}

var endTildesRE = /~*$/
function encode (v, out) {
var t, a, T = typeof v, val, prefix
var t, T = typeof v

if (T === 'number') {
out.push(isFinite(v) ? v.toString() : NULL)
Expand Down Expand Up @@ -183,7 +182,7 @@
}
}
}
while(out[out.length - 1] === '') {
while (out[out.length - 1] === '') {
out.pop()
}
out.push(')')
Expand All @@ -194,14 +193,12 @@
}
}

const closeObjRE = /\)+$/g
const noTilde = {'!': true, '(': true, ')': true}
exports.stringify = function (v, options) {
var out = [], t, str = '', len, sep = false, short = options && options.short
encode(v, out)
len = out.length - 1
// until where we have to stringify
while(t = out[len], t === '' || (short && t === ')')) {
while (t = out[len], t === '' || (short && t === ')')) {
len--
}
// extended join('~')
Expand Down

0 comments on commit 52220c4

Please sign in to comment.