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.3.11 to 3.3.12

2

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

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

@@ -243,5 +243,2 @@ /*

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

@@ -248,0 +245,0 @@ if (!validate(get(a, i), b)) {

@@ -64,2 +64,3 @@ var assert = require('assert');

[{$exists:true}, [0,false,void 0, 1, {}],[0, false, 1, {}]],
[{"a.b": {$exists: true}}, [{a: {b: "exists"}}, {a: {c: "does not exist"}}], [{a: {b: "exists"}}]],

@@ -131,2 +132,5 @@ // $in

// Multiple conditions on an undefined root
[{"a.b": {$exists: true, $nin: [null]}}, [{a: {b: "exists"}}, {a: {c: "does not exist"}}], [{a: {b: "exists"}}]],
// $where

@@ -145,3 +149,3 @@ [{$where:function () { return this.v === 1 }}, [{v:1},{v:2}],[{v:1}]],

[
{tags: {$all: [{$elemMatch: {a: 1}}]}},
{tags: {$all: [{$elemMatch: {a: 1}}]}},
[{tags: [{a: 1}]}, {tags: [{a: 1}, {b: 1}]}], [{tags: [{a: 1}]}, {tags: [{a: 1}, {b: 1}]}]

@@ -181,14 +185,14 @@ ],

[
{ c: { d: 'd' }},
[{ a: 'b', b: 'c', c: { d: 'd', e: 'e' }}, { c: { d: 'e' }}],
{ c: { d: 'd' }},
[{ a: 'b', b: 'c', c: { d: 'd', e: 'e' }}, { c: { d: 'e' }}],
[{ a: 'b', b: 'c', c: { d: 'd', e: 'e' }}]
],
// based on https://gist.github.com/jdnichollsc/00ea8cf1204b17d9fb9a991fbd1dfee6
[
{ $and: [{ 'a.s': { $lte: new Date("2017-01-29T05:00:00.000Z") }}, {'a.e': { $gte: new Date("2017-01-08T05:00:00.000Z") }}]},
[{ a: { s: new Date("2017-01-13T05:00:00.000Z"), e: new Date("2017-01-31T05:00:00.000Z") }}],
{ $and: [{ 'a.s': { $lte: new Date("2017-01-29T05:00:00.000Z") }}, {'a.e': { $gte: new Date("2017-01-08T05:00:00.000Z") }}]},
[{ a: { s: new Date("2017-01-13T05:00:00.000Z"), e: new Date("2017-01-31T05:00:00.000Z") }}],
[{ a: { s: new Date("2017-01-13T05:00:00.000Z"), e: new Date("2017-01-31T05:00:00.000Z") }}]
],
].forEach(function (operation, i) {

@@ -195,0 +199,0 @@

Sorry, the diff of this file is not supported yet

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