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 4.6.2 to 4.6.4

12

index.d.ts

@@ -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 @@

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