ldap-filters
Advanced tools
Comparing version 1.1.0 to 1.2.0
var Filter = require('./index'); | ||
var input = '(&(givenName=jenny)(sn=jensen)(|(c=us)(st=ontario)))'; | ||
var fs = require('fs'); | ||
input = fs.readFileSync('filter_test.txt','utf8'); | ||
var parsed = Filter.parse(input); | ||
@@ -9,2 +12,2 @@ | ||
console.log(parsed + ''); | ||
console.log(parsed.toString(true,null,false)); | ||
console.log(parsed.toString(true)); |
@@ -58,2 +58,3 @@ var soundex = require('soundex'); | ||
Filter.indent_char = ' '; | ||
Filter.collapse_not = true; | ||
@@ -160,7 +161,12 @@ /* Escape a string value */ | ||
var id_str = this._indent(indent,level,id_char); | ||
var id_str2 = id_str; | ||
var nl = indent? '\n': ''; | ||
if (Filter.collapse_not && (this.comp == '!')) | ||
nl = '', id_str2 = '', indent = 0; | ||
return [ | ||
id_str, '(', this.comp, nl, this.filters.map(function(item){ | ||
return item.toString(indent,level+1,id_char) | ||
}).join(nl), nl, id_str, ')' | ||
}).join(nl), nl, id_str2, ')' | ||
].join(''); | ||
@@ -167,0 +173,0 @@ }; |
{ | ||
"name": "ldap-filters", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Library for generating, parsing, and evaluating LDAP filters", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -59,3 +59,5 @@ var should = require('chai').should(); | ||
it('respects collapse_not setting'); | ||
}); | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51489
18
1234
2