lint cleanup
This commit is contained in:
parent
9e35cf76ac
commit
55ba2d1855
|
@ -14,7 +14,6 @@ var Protocol = require('../protocol');
|
||||||
///--- API
|
///--- API
|
||||||
|
|
||||||
function SubstringFilter(options) {
|
function SubstringFilter(options) {
|
||||||
var _any;
|
|
||||||
if (typeof (options) === 'object') {
|
if (typeof (options) === 'object') {
|
||||||
if (!options.attribute || typeof (options.attribute) !== 'string')
|
if (!options.attribute || typeof (options.attribute) !== 'string')
|
||||||
throw new TypeError('options.attribute (string) required');
|
throw new TypeError('options.attribute (string) required');
|
||||||
|
@ -32,6 +31,7 @@ function SubstringFilter(options) {
|
||||||
options.type = Protocol.FILTER_SUBSTRINGS;
|
options.type = Protocol.FILTER_SUBSTRINGS;
|
||||||
Filter.call(this, options);
|
Filter.call(this, options);
|
||||||
|
|
||||||
|
var self = this;
|
||||||
this.__defineGetter__('json', function () {
|
this.__defineGetter__('json', function () {
|
||||||
return {
|
return {
|
||||||
type: 'SubstringMatch',
|
type: 'SubstringMatch',
|
||||||
|
@ -67,7 +67,8 @@ SubstringFilter.prototype.toString = function () {
|
||||||
|
|
||||||
|
|
||||||
function escapeRegExp(str) {
|
function escapeRegExp(str) {
|
||||||
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
/* JSSTYLED */
|
||||||
|
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
||||||
}
|
}
|
||||||
|
|
||||||
SubstringFilter.prototype.matches = function (target) {
|
SubstringFilter.prototype.matches = function (target) {
|
||||||
|
|
|
@ -131,7 +131,7 @@ test('GH-109 = to ber uses plain values', function (t) {
|
||||||
var writer = new BerWriter();
|
var writer = new BerWriter();
|
||||||
f.toBer(writer);
|
f.toBer(writer);
|
||||||
|
|
||||||
var f = new ApproximateFilter();
|
f = new ApproximateFilter();
|
||||||
t.ok(f);
|
t.ok(f);
|
||||||
|
|
||||||
var reader = new BerReader(writer.buffer);
|
var reader = new BerReader(writer.buffer);
|
||||||
|
|
|
@ -143,7 +143,7 @@ test('GH-109 = to ber uses plain values', function (t) {
|
||||||
var writer = new BerWriter();
|
var writer = new BerWriter();
|
||||||
f.toBer(writer);
|
f.toBer(writer);
|
||||||
|
|
||||||
var f = new EqualityFilter();
|
f = new EqualityFilter();
|
||||||
t.ok(f);
|
t.ok(f);
|
||||||
|
|
||||||
var reader = new BerReader(writer.buffer);
|
var reader = new BerReader(writer.buffer);
|
||||||
|
|
|
@ -130,7 +130,7 @@ test('GH-109 = to ber uses plain values', function (t) {
|
||||||
var writer = new BerWriter();
|
var writer = new BerWriter();
|
||||||
f.toBer(writer);
|
f.toBer(writer);
|
||||||
|
|
||||||
var f = new GreaterThanEqualsFilter();
|
f = new GreaterThanEqualsFilter();
|
||||||
t.ok(f);
|
t.ok(f);
|
||||||
|
|
||||||
var reader = new BerReader(writer.buffer);
|
var reader = new BerReader(writer.buffer);
|
||||||
|
|
|
@ -131,7 +131,7 @@ test('GH-109 = to ber uses plain values', function (t) {
|
||||||
var writer = new BerWriter();
|
var writer = new BerWriter();
|
||||||
f.toBer(writer);
|
f.toBer(writer);
|
||||||
|
|
||||||
var f = new LessThanEqualsFilter();
|
f = new LessThanEqualsFilter();
|
||||||
t.ok(f);
|
t.ok(f);
|
||||||
|
|
||||||
var reader = new BerReader(writer.buffer);
|
var reader = new BerReader(writer.buffer);
|
||||||
|
|
|
@ -96,7 +96,7 @@ test('GH-109 = to ber uses plain values', function (t) {
|
||||||
var writer = new BerWriter();
|
var writer = new BerWriter();
|
||||||
f.toBer(writer);
|
f.toBer(writer);
|
||||||
|
|
||||||
var f = new PresenceFilter();
|
f = new PresenceFilter();
|
||||||
t.ok(f);
|
t.ok(f);
|
||||||
|
|
||||||
var reader = new BerReader(writer.buffer);
|
var reader = new BerReader(writer.buffer);
|
||||||
|
|
|
@ -164,7 +164,7 @@ test('GH-109 = to ber uses plain values', function (t) {
|
||||||
var writer = new BerWriter();
|
var writer = new BerWriter();
|
||||||
f.toBer(writer);
|
f.toBer(writer);
|
||||||
|
|
||||||
var f = new SubstringFilter();
|
f = new SubstringFilter();
|
||||||
t.ok(f);
|
t.ok(f);
|
||||||
|
|
||||||
var reader = new BerReader(writer.buffer);
|
var reader = new BerReader(writer.buffer);
|
||||||
|
|
Loading…
Reference in New Issue