collect.js
Advanced tools
Comparing version 4.6.2 to 4.6.4
@@ -89,3 +89,3 @@ type Operator = "===" | "==" | "!==" | "!=" | "<>" | ">" | "<" | ">=" | "<=" | ||
*/ | ||
each(fn: Function): this; | ||
each(fn: (item: Item) => void): this; | ||
@@ -106,4 +106,4 @@ /** | ||
*/ | ||
filter(fn: (item: Item) => boolean): Collection<Item>; | ||
filter(fn: (item: Item, key?: any) => boolean): Collection<Item>; | ||
filter(fn: (item: Item) => boolean): Collection<Item>; | ||
filter(fn: (item: Item, key?: any) => boolean): Collection<Item>; | ||
@@ -120,3 +120,3 @@ /** | ||
*/ | ||
flatMap(fn: Function): Collection<Item>; | ||
flatMap<T>(fn: (item: Item, key: any) => T): Collection<T>; | ||
@@ -386,3 +386,3 @@ /** | ||
*/ | ||
sortByDesc(fn: (item: Item) => number): Collection<Item>; | ||
sortByDesc(fn: (item: Item) => number): Collection<Item>; | ||
@@ -418,3 +418,3 @@ /** | ||
*/ | ||
tap(fn: Function): this; | ||
tap(fn: (collection: Collection<Item>) => void): this; | ||
@@ -421,0 +421,0 @@ /** |
{ | ||
"name": "collect.js", | ||
"version": "4.6.2", | ||
"version": "4.6.4", | ||
"description": "Convenient and dependency free wrapper for working with arrays and objects.", | ||
@@ -9,10 +9,10 @@ "main": "dist/index.js", | ||
"pretest": "npm run transpile", | ||
"test": "node_modules/.bin/mocha test/tests.js", | ||
"transpile": "node_modules/babel-cli/bin/babel.js src --quiet --out-dir dist", | ||
"bundle": "node_modules/.bin/webpack dist/index.js build/collect.js --output-library collect", | ||
"uglify": "node_modules/.bin/uglifyjs build/collect.js --compress --mangle --output build/collect.min.js", | ||
"test": "mocha test/tests.js", | ||
"transpile": "babel src --quiet --out-dir dist", | ||
"bundle": "webpack dist/index.js build/collect.js --output-library collect", | ||
"uglify": "uglifyjs build/collect.js --compress --mangle --output build/collect.min.js", | ||
"build": "npm run transpile && npm run bundle && npm run uglify", | ||
"eslint": "node_modules/.bin/eslint src/ test/", | ||
"coverage": "npm run transpile && node_modules/.bin/nyc mocha test/tests.js", | ||
"reporter": "node_modules/.bin/nyc report --reporter=html", | ||
"eslint": "eslint src/ test/", | ||
"coverage": "npm run transpile && nyc mocha test/tests.js", | ||
"reporter": "nyc report --reporter=html", | ||
"prepublishOnly": "npm run build" | ||
@@ -19,0 +19,0 @@ }, |
@@ -941,5 +941,2 @@ # <img src="https://raw.githubusercontent.com/ecrmnn/collect.js/master/collectjs.jpg" alt="collect.js"> | ||
const collection = collect([{ | ||
name: 'Steven Gerrard', | ||
number: 8, | ||
}, { | ||
club: 'Liverpool', | ||
@@ -951,3 +948,3 @@ nickname: 'The Reds', | ||
//=> ['name', 'number', 'club', 'nickname'] | ||
//=> ['club', 'nickname'] | ||
``` | ||
@@ -954,0 +951,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
393112
216
5614
2278