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

sift

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sift - npm Package Compare versions

Comparing version 3.2.6 to 3.2.7

2

package.json
{
"name": "sift",
"description": "mongodb query style array filtering",
"version": "3.2.6",
"version": "3.2.7",
"repository": "crcn/sift.js",

@@ -6,0 +6,0 @@ "author": {

@@ -142,3 +142,3 @@ ## validate objects & filter arrays with mongodb queries

```javascript
sift({ location: { $in: ['Costa Rica','Brazil'] } }, { name: 'Craig', location: 'Brazil' });
sift({ location: { $in: ['Costa Rica','Brazil'] } }, [ { name: 'Craig', location: 'Brazil' } ]);
```

@@ -145,0 +145,0 @@

@@ -72,3 +72,2 @@ /*

var operator = {

@@ -174,7 +173,3 @@

$all: function(a, b) {
if (!b) b = [];
for (var i = a.length; i--;) {
if (!~comparable(b).indexOf(get(a, i))) return false;
}
return true;
return operator.$and(a, b);
},

@@ -202,2 +197,3 @@

$and: function(a, b) {
if (!b) b = [];
for (var i = 0, n = a.length; i < n; i++) if (!validate(get(a, i), b)) return false;

@@ -287,2 +283,9 @@ return true;

$all: function(a) {
return prepare.$and(a);
},
/**
*/
$or: function(a) {

@@ -289,0 +292,0 @@ return a.map(parse);

@@ -136,2 +136,6 @@ var assert = require('assert');

[{a:{$elemMatch:{b:2,c:{$gt:2}}}}, [{a:{b:1,c:2}},{a:{b:1,c:2,d:3}},[{a:{b:2,c:3}}]], [[{a:{b:2,c:3}}]]],
[
{tags: {$all: [{$elemMatch: {a: 1}}]}},
[{tags: [{a: 1}]}, {tags: [{a: 1}, {b: 1}]}], [{tags: [{a: 1}]}, {tags: [{a: 1}, {b: 1}]}]
],

@@ -138,0 +142,0 @@ // dot-notation

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