collect.js
Advanced tools
Comparing version 3.0.4 to 3.0.5
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2038
218410
1696