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.19.0 to 4.19.2

6

docs/api/combine.md

@@ -8,3 +8,3 @@ # `combine()`

const combine = collection.combine(['Steven Gerrard', 8]);
const combine = collection.combine(['Mohamed Salah', 11]);

@@ -14,4 +14,4 @@ combine.all();

// {
// name: 'Steven Gerrard',
// number: 8
// name: 'Mohamed Salah',
// number: 11
// }

@@ -18,0 +18,0 @@ ```

@@ -13,4 +13,4 @@ # `concat()`

concatenated = concatenated.concat({
name: 'Steven Gerrard',
number: 8,
name: 'Mohamed Salah',
number: 11,
});

@@ -20,5 +20,5 @@

// [1, 2, 3, 'a', 'b', 'c', 'Steven Gerrard', 8]
// [1, 2, 3, 'a', 'b', 'c', 'Mohamed Salah', 11]
```
[View source on GitHub](https://github.com/ecrmnn/collect.js/blob/master/src/methods/concat.js)

@@ -7,4 +7,4 @@ # `contains()`

const collection = collect({
name: 'Steven Gerrard',
number: 8,
name: 'Mohamed Salah',
number: 11,
});

@@ -18,3 +18,3 @@

collection.contains('Steven Gerrard');
collection.contains('Mohamed Salah');
// true

@@ -36,4 +36,4 @@ ```

const collection = collect({
name: 'Steven Gerrard',
number: 8,
name: 'Mohamed Salah',
number: 11,
});

@@ -40,0 +40,0 @@

@@ -23,5 +23,5 @@ # `countBy()`

const collection = collect([
'alice@gmail.com',
'bob@yahoo.com',
'carlos@gmail.com',
'mohamed.salah@gmail.com',
'sadio.mane@yahoo.com',
'roberto.firmino@gmail.com',
]);

@@ -28,0 +28,0 @@

@@ -7,4 +7,4 @@ # `flip()`

const collection = collect({
name: 'Steven Gerrard',
number: 8,
name: 'Sadio Mané',
number: 10,
});

@@ -17,4 +17,4 @@

// {
// 'Steven Gerrard': 'name',
// '8': 'number',
// 'Sadio Mané': 'name',
// '10': 'number',
// }

@@ -21,0 +21,0 @@ ```

@@ -7,4 +7,4 @@ # `forget()`

const collection = collect({
name: 'Steven Gerrard',
number: 8,
name: 'Sadio Mané',
number: 10,
});

@@ -17,3 +17,3 @@

// {
// name: 'Steven Gerrard',
// name: 'Sadio Mané',
// }

@@ -20,0 +20,0 @@ ```

@@ -7,4 +7,4 @@ # `get()`

const collection = collect({
firstname: 'Chuck',
lastname: 'Norris',
firstname: 'Mohamed',
lastname: 'Salah',
});

@@ -14,3 +14,3 @@

// Norris
// Salah

@@ -34,4 +34,4 @@ collection.get('middlename');

const collection = collect({
firstname: 'Chuck',
lastname: 'Norris',
firstname: 'Mohamed',
lastname: 'Salah',
});

@@ -47,4 +47,4 @@

const collection = collect({
firstname: 'Chuck',
lastname: 'Norris',
firstname: 'Mohamed',
lastname: 'Salah',
});

@@ -51,0 +51,0 @@

@@ -10,3 +10,6 @@ # `mapInto()`

const collection = collect(['Roberto Firmino', 'Sadio Mané']);
const collection = collect([
'Roberto Firmino',
'Sadio Mané',
]);

@@ -13,0 +16,0 @@ const players = collection.mapInto(Player);

{
"name": "collect.js",
"version": "4.19.0",
"version": "4.19.2",
"description": "Convenient and dependency free wrapper for working with arrays and objects.",

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

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

const combine = collection.combine(['Steven Gerrard', 8]);
const combine = collection.combine(['Mohamed Salah', 11]);

@@ -276,4 +276,4 @@ combine.all();

// {
// name: 'Steven Gerrard',
// number: 8
// name: 'Mohamed Salah',
// number: 11
// }

@@ -294,4 +294,4 @@ ```

concatenated = concatenated.concat({
name: 'Steven Gerrard',
number: 8,
name: 'Mohamed Salah',
number: 11,
});

@@ -301,3 +301,3 @@

// [1, 2, 3, 'a', 'b', 'c', 'Steven Gerrard', 8]
// [1, 2, 3, 'a', 'b', 'c', 'Mohamed Salah', 11]
```

@@ -311,4 +311,4 @@

const collection = collect({
name: 'Steven Gerrard',
number: 8,
name: 'Mohamed Salah',
number: 11,
});

@@ -322,3 +322,3 @@

collection.contains('Steven Gerrard');
collection.contains('Mohamed Salah');
// true

@@ -340,4 +340,4 @@ ```

const collection = collect({
name: 'Steven Gerrard',
number: 8,
name: 'Mohamed Salah',
number: 11,
});

@@ -393,5 +393,5 @@

const collection = collect([
'alice@gmail.com',
'bob@yahoo.com',
'carlos@gmail.com',
'mohamed.salah@gmail.com',
'sadio.mane@yahoo.com',
'roberto.firmino@gmail.com',
]);

@@ -774,4 +774,4 @@

const collection = collect({
name: 'Steven Gerrard',
number: 8,
name: 'Sadio Mané',
number: 10,
});

@@ -784,4 +784,4 @@

// {
// 'Steven Gerrard': 'name',
// '8': 'number',
// 'Sadio Mané': 'name',
// '10': 'number',
// }

@@ -810,4 +810,4 @@ ```

const collection = collect({
name: 'Steven Gerrard',
number: 8,
name: 'Sadio Mané',
number: 10,
});

@@ -820,3 +820,3 @@

// {
// name: 'Steven Gerrard',
// name: 'Sadio Mané',
// }

@@ -833,4 +833,4 @@ ```

const collection = collect({
firstname: 'Chuck',
lastname: 'Norris',
firstname: 'Mohamed',
lastname: 'Salah',
});

@@ -840,3 +840,3 @@

// Norris
// Salah

@@ -860,4 +860,4 @@ collection.get('middlename');

const collection = collect({
firstname: 'Chuck',
lastname: 'Norris',
firstname: 'Mohamed',
lastname: 'Salah',
});

@@ -873,4 +873,4 @@

const collection = collect({
firstname: 'Chuck',
lastname: 'Norris',
firstname: 'Mohamed',
lastname: 'Salah',
});

@@ -1291,3 +1291,6 @@

const collection = collect(['Roberto Firmino', 'Sadio Mané']);
const collection = collect([
'Roberto Firmino',
'Sadio Mané',
]);

@@ -1294,0 +1297,0 @@ const players = collection.mapInto(Player);

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