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.12.2 to 4.12.5

2

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

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

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

collection.crossJoin(['a', 'b']);
const joined = collection.crossJoin(['a', 'b']);
collection.all();
joined.all();

@@ -1108,4 +1108,4 @@ //=> [

const sequence = chunks.mapSpread((odd, even) => {
return odd + even;
const sequence = chunks.mapSpread((even, odd) => {
return even + odd;
});

@@ -1816,13 +1816,2 @@

```
#### ``split()``
The split method breaks a collection into the given number of groups:
```js
const collection = collect([1, 2, 3, 4, 5]);
const groups = collection.split(3);
//=> [[1, 2], [3, 4], [5]]
```
In addition, you can pass a third argument containing the new items to replace the items removed from the collection:

@@ -1843,2 +1832,12 @@ ```js

#### ``split()``
The split method breaks a collection into the given number of groups:
```js
const collection = collect([1, 2, 3, 4, 5]);
const groups = collection.split(3);
//=> [[1, 2], [3, 4], [5]]
```
#### ``sum()``

@@ -1845,0 +1844,0 @@ The sum method returns the sum of all items in the collection:

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