Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ldap-filters

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldap-filters - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

test/22_simplify.js

12

lib/filter.js

@@ -30,2 +30,11 @@ var soundex = require('soundex');

},
simplify: function(){
if (this.filters) {
if (this.filters.length == 1) return this.filters[0].simplify();
else this.filters = this.filters.map(function(filter){
return filter.simplify();
});
}
return this;
},
_indent: function(indent,level,id_char){

@@ -209,2 +218,5 @@ var _i = parseInt(indent);

GroupNot.prototype = Object.create(Group.prototype);
GroupNot.prototype.simplify = function(){
return this;
};
GroupNot.prototype._match = function(data){

@@ -211,0 +223,0 @@ return this.filters.every(function(cv,idx,all){

2

package.json
{
"name": "ldap-filters",
"version": "2.0.0",
"version": "2.1.0",
"description": "Library for generating, parsing, and evaluating LDAP filters",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -63,3 +63,3 @@ node-ldap-filters

#### Aggregate methods
#### Logical/Aggregate methods

@@ -85,2 +85,13 @@ Simple filters can be aggregated with AND, OR, and NOT:

### Simplify a filter
The `.simplify()` method will reduce any AND or OR filters that have only
one child/condition and replace them with that filter. NOT filters, and
any other filters will remain intact.
```javascript
var input = '(&(uid=jenny))';
Filter.parse(input).simplify().toString() // => '(uid=jenny)'
```
### Output/print

@@ -87,0 +98,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc