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

collect.js

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collect.js - npm Package Compare versions

Comparing version 3.0.22 to 3.0.26

.idea/.name

12

package.json
{
"name": "collect.js",
"version": "3.0.22",
"version": "3.0.26",
"description": "Convenient and dependency free wrapper for working with arrays and objects.",
"main": "src/index.js",
"typings": "index.d.ts",
"scripts": {
"test": "node_modules/.bin/mocha test/tests.js",
"test:watch": "node_modules/.bin/mocha -w test/tests.js"
"test:watch": "node_modules/.bin/mocha -w test/tests.js",
"coverage": "node_modules/.bin/nyc mocha test/tests.js",
"reporter": "node_modules/.bin/nyc report --reporter=html"
},

@@ -44,4 +47,5 @@ "repository": {

"chai": "^3.5.0",
"mocha": "^2.4.5"
"mocha": "^2.4.5",
"nyc": "^11.0.2"
}
}
}

@@ -1690,3 +1690,37 @@ # <img src="https://raw.githubusercontent.com/ecrmnn/collect.js/master/collectjs.jpg" alt="collect.js">

```
**Less than or equal operator ``(<=)``**
```js
const filtered = collection.where('price', '<=', 100);
filtered.all();
//=> [
//=> {product: 'Chair', price: 100},
//=> {product: 'Door', price: 100}
//=> ]
```
**Greater than operator ``(>)``**
```js
const filtered = collection.where('price', '>', 100);
filtered.all();
//=> [
//=> {product: 'Desk', price: 200},
//=> {product: 'Bookcase', price: 150}
//=> ]
```
**Greater than or equal operator ``(>=)``**
```js
const filtered = collection.where('price', '>=', 150);
filtered.all();
//=> [
//=> {product: 'Desk', price: 200},
//=> {product: 'Bookcase', price: 150}
//=> ]
```
#### ``whereIn()``

@@ -1693,0 +1727,0 @@ The whereIn method filters the collection by a given key / value contained within the given array.

@@ -5,8 +5,10 @@ 'use strict';

const chunks = [];
let index = 0;
while (this.items.length) {
chunks.push(this.items.splice(0, size));
}
do {
chunks.push(this.items.slice(index, index + size));
index += size;
} while (index < this.items.length);
return new this.constructor(chunks);
};

Sorry, the diff of this file is not supported yet

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