From 52220c428868338a922bb3e2b1649ac192d629aa Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Mon, 3 Apr 2017 00:01:03 +0200 Subject: [PATCH] lint --- lib/jsurl2.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/jsurl2.js b/lib/jsurl2.js index 99317de..41bda1a 100644 --- a/lib/jsurl2.js +++ b/lib/jsurl2.js @@ -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++ ) {} @@ -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) @@ -183,7 +182,7 @@ } } } - while(out[out.length - 1] === '') { + while (out[out.length - 1] === '') { out.pop() } out.push(')') @@ -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('~')