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.4 to 3.0.5

2

package.json
{
"name": "collect.js",
"version": "3.0.4",
"version": "3.0.5",
"description": "Convenient and dependency free wrapper for working with arrays and objects.",

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

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

- [whereIn](#wherein)
- [whereInLoose](#whereinloose)
- [whereNotIn](#whereNotIn)
- [whereStrict](#wherestrict)
- [zip](#zip)

@@ -1605,6 +1603,6 @@

const collection = collect([
{'product': 'Desk', 'price': 200},
{'product': 'Chair', 'price': 100},
{'product': 'Bookcase', 'price': 150},
{'product': 'Door', 'price': '100'},
{product: 'Desk', price: 200},
{product: 'Chair', price: 100},
{product: 'Bookcase', price: 150},
{product: 'Door', price: 100},
]);

@@ -1617,4 +1615,4 @@

//=> [
//=> {'product': 'Chair', 'price': 100},
//=> {'product': 'Door', 'price': '100'}
//=> {product: 'Chair', price: 100},
//=> {product: 'Door', price: 100}
//=> ]

@@ -1631,5 +1629,4 @@ ```

//=> [
//=> {'product': 'Desk', 'price': 200},
//=> {'product': 'Bookcase', 'price': 150},
//=> {'product': 'Door', 'price': '100'},
//=> {product: 'Desk', price: 200},
//=> {product: 'Bookcase', price: 150}
//=> ]

@@ -1646,5 +1643,2 @@ ```

#### ``whereStrict()``
This method has the same signature as the ``where`` method; however, all values are compared using "strict" comparisons.
#### ``whereIn()``

@@ -1670,7 +1664,3 @@ The whereIn method filters the collection by a given key / value contained within the given array.

```
> The ``whereIn`` method uses strict comparisons when checking item values. Use the ``whereInLoose`` method to filter using "loose" comparisons.
#### ``whereInLoose()``
This method has the same signature as the ``whereIn`` method; however, all values are compared using "loose" comparisons.
#### ``whereNotIn()``

@@ -1677,0 +1667,0 @@ The whereNotIn method filters the collection by a given key / value not contained within the given array:

@@ -595,2 +595,8 @@ 'use strict';

expect(filtered5.all()).to.eql([]);
const filtered6 = collection2.where('price', 100);
expect(filtered6.all()).to.eql([
{ 'product': 'Chair', 'price': 100 }
]);
});

@@ -597,0 +603,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