From 55ba2d1855289861aed8fa417f7b1635833da982 Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Wed, 30 Jan 2013 23:58:40 +0000 Subject: [PATCH] lint cleanup --- lib/filters/substr_filter.js | 5 +++-- test/filters/approx.test.js | 2 +- test/filters/eq.test.js | 2 +- test/filters/ge.test.js | 2 +- test/filters/le.test.js | 2 +- test/filters/presence.test.js | 2 +- test/filters/substr.test.js | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/filters/substr_filter.js b/lib/filters/substr_filter.js index 00c00f9..07a23da 100644 --- a/lib/filters/substr_filter.js +++ b/lib/filters/substr_filter.js @@ -14,7 +14,6 @@ var Protocol = require('../protocol'); ///--- API function SubstringFilter(options) { - var _any; if (typeof (options) === 'object') { if (!options.attribute || typeof (options.attribute) !== 'string') throw new TypeError('options.attribute (string) required'); @@ -32,6 +31,7 @@ function SubstringFilter(options) { options.type = Protocol.FILTER_SUBSTRINGS; Filter.call(this, options); + var self = this; this.__defineGetter__('json', function () { return { type: 'SubstringMatch', @@ -67,7 +67,8 @@ SubstringFilter.prototype.toString = function () { function escapeRegExp(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + /* JSSTYLED */ + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); } SubstringFilter.prototype.matches = function (target) { diff --git a/test/filters/approx.test.js b/test/filters/approx.test.js index 151d38f..c9041e5 100644 --- a/test/filters/approx.test.js +++ b/test/filters/approx.test.js @@ -131,7 +131,7 @@ test('GH-109 = to ber uses plain values', function (t) { var writer = new BerWriter(); f.toBer(writer); - var f = new ApproximateFilter(); + f = new ApproximateFilter(); t.ok(f); var reader = new BerReader(writer.buffer); diff --git a/test/filters/eq.test.js b/test/filters/eq.test.js index 2f15ecc..37d8b8c 100644 --- a/test/filters/eq.test.js +++ b/test/filters/eq.test.js @@ -143,7 +143,7 @@ test('GH-109 = to ber uses plain values', function (t) { var writer = new BerWriter(); f.toBer(writer); - var f = new EqualityFilter(); + f = new EqualityFilter(); t.ok(f); var reader = new BerReader(writer.buffer); diff --git a/test/filters/ge.test.js b/test/filters/ge.test.js index e8fa3c7..e67780e 100644 --- a/test/filters/ge.test.js +++ b/test/filters/ge.test.js @@ -130,7 +130,7 @@ test('GH-109 = to ber uses plain values', function (t) { var writer = new BerWriter(); f.toBer(writer); - var f = new GreaterThanEqualsFilter(); + f = new GreaterThanEqualsFilter(); t.ok(f); var reader = new BerReader(writer.buffer); diff --git a/test/filters/le.test.js b/test/filters/le.test.js index 8244bdd..d4c41d7 100644 --- a/test/filters/le.test.js +++ b/test/filters/le.test.js @@ -131,7 +131,7 @@ test('GH-109 = to ber uses plain values', function (t) { var writer = new BerWriter(); f.toBer(writer); - var f = new LessThanEqualsFilter(); + f = new LessThanEqualsFilter(); t.ok(f); var reader = new BerReader(writer.buffer); diff --git a/test/filters/presence.test.js b/test/filters/presence.test.js index a4eaba4..3ed6f99 100644 --- a/test/filters/presence.test.js +++ b/test/filters/presence.test.js @@ -96,7 +96,7 @@ test('GH-109 = to ber uses plain values', function (t) { var writer = new BerWriter(); f.toBer(writer); - var f = new PresenceFilter(); + f = new PresenceFilter(); t.ok(f); var reader = new BerReader(writer.buffer); diff --git a/test/filters/substr.test.js b/test/filters/substr.test.js index fbea921..e8bc9f8 100644 --- a/test/filters/substr.test.js +++ b/test/filters/substr.test.js @@ -164,7 +164,7 @@ test('GH-109 = to ber uses plain values', function (t) { var writer = new BerWriter(); f.toBer(writer); - var f = new SubstringFilter(); + f = new SubstringFilter(); t.ok(f); var reader = new BerReader(writer.buffer);