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.25.0 to 4.26.0

dist/methods/avg.js

5

dist/index.js

@@ -35,3 +35,3 @@ 'use strict';

Collection.prototype.average = require('./methods/average');
Collection.prototype.avg = require('./methods/average');
Collection.prototype.avg = require('./methods/avg');
Collection.prototype.chunk = require('./methods/chunk');

@@ -111,4 +111,5 @@ Collection.prototype.collapse = require('./methods/collapse');

Collection.prototype.slice = require('./methods/slice');
Collection.prototype.some = require('./methods/contains');
Collection.prototype.some = require('./methods/some');
Collection.prototype.sort = require('./methods/sort');
Collection.prototype.sortDesc = require('./methods/sortDesc');
Collection.prototype.sortBy = require('./methods/sortBy');

@@ -115,0 +116,0 @@ Collection.prototype.sortByDesc = require('./methods/sortByDesc');

2

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

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

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

- [sortByDesc](#sortbydesc)
- [sortDesc](#sortdesc)
- [sortKeys](#sortkeys)

@@ -2209,2 +2210,18 @@ - [sortKeysDesc](#sortkeysdesc)

#### `sortDesc()`
This method will sort the collection in the opposite order as the `sort` method.
```js
const collection = collect([1, 3, 5, 2, 4]);
const sorted = collection.sortDesc();
sorted.all();
// [5, 4, 3, 2, 1]
```
Unlike `sort`, you may not pass a callback to `sortDesc`. If you wish to use a callback, you should use `sort` and invert your comparison.
#### `sortKeys()`

@@ -2211,0 +2228,0 @@

@@ -33,3 +33,3 @@ 'use strict';

Collection.prototype.average = require('./methods/average');
Collection.prototype.avg = require('./methods/average');
Collection.prototype.avg = require('./methods/avg');
Collection.prototype.chunk = require('./methods/chunk');

@@ -109,4 +109,5 @@ Collection.prototype.collapse = require('./methods/collapse');

Collection.prototype.slice = require('./methods/slice');
Collection.prototype.some = require('./methods/contains');
Collection.prototype.some = require('./methods/some');
Collection.prototype.sort = require('./methods/sort');
Collection.prototype.sortDesc = require('./methods/sortDesc');
Collection.prototype.sortBy = require('./methods/sortBy');

@@ -113,0 +114,0 @@ Collection.prototype.sortByDesc = require('./methods/sortByDesc');

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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