Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sort-array

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sort-array - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

6

lib/sort-array.js

@@ -38,3 +38,3 @@ 'use strict'

* ```js
* > a.sortBy(DJs, 'slot')
* > sortBy(DJs, 'slot')
* [ { name: 'Mike', slot: 'afternoon' },

@@ -51,3 +51,3 @@ * { name: 'Zane', slot: 'evening' },

* > var slotOrder = [ 'morning', 'afternoon', 'evening', 'twilight' ]
* > a.sortBy(DJs, 'slot', { slot: slotOrder })
* > sortBy(DJs, 'slot', { slot: slotOrder })
* [ { name: 'Rodney', slot: 'morning' },

@@ -63,3 +63,3 @@ * { name: 'Chris', slot: 'morning' },

* ```js
* > a.sortBy(DJs, ['slot', 'name'], { slot: slotOrder })
* > sortBy(DJs, ['slot', 'name'], { slot: slotOrder })
* [ { name: 'Chris', slot: 'morning' },

@@ -66,0 +66,0 @@ * { name: 'Rodney', slot: 'morning' },

{
"name": "sort-array",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "1.1.0",
"version": "1.1.1",
"description": "Sort an array of objects by any property value, at any depth, in any custom order.",

@@ -27,10 +27,10 @@ "repository": "https://github.com/75lb/sort-array.git",

"dependencies": {
"array-back": "^1.0.0",
"object-get": "^2.0.1",
"array-back": "^1.0.3",
"object-get": "^2.0.4",
"typical": "^2.4.2"
},
"devDependencies": {
"tape": "^4.4.0",
"jsdoc-to-markdown": "^1.3.3"
"tape": "^4.5.1",
"jsdoc-to-markdown": "^1.3.6"
}
}

@@ -8,2 +8,3 @@ [![view on npm](http://img.shields.io/npm/v/sort-array.svg)](https://www.npmjs.org/package/sort-array)

<a name="module_sort-array"></a>
## sort-array

@@ -17,2 +18,3 @@ Sort an array of objects by any property value, at any depth, in any custom order.

<a name="exp_module_sort-array--sortBy"></a>
### sortBy(recordset, columnNames, [customOrder]) ⇒ <code>Array</code> ⏏

@@ -42,3 +44,3 @@ **Kind**: Exported function

```js
> a.sortBy(DJs, 'slot')
> sortBy(DJs, 'slot')
[ { name: 'Mike', slot: 'afternoon' },

@@ -55,3 +57,3 @@ { name: 'Zane', slot: 'evening' },

> var slotOrder = [ 'morning', 'afternoon', 'evening', 'twilight' ]
> a.sortBy(DJs, 'slot', { slot: slotOrder })
> sortBy(DJs, 'slot', { slot: slotOrder })
[ { name: 'Rodney', slot: 'morning' },

@@ -67,3 +69,3 @@ { name: 'Chris', slot: 'morning' },

```js
> a.sortBy(DJs, ['slot', 'name'], { slot: slotOrder })
> sortBy(DJs, ['slot', 'name'], { slot: slotOrder })
[ { name: 'Chris', slot: 'morning' },

@@ -70,0 +72,0 @@ { name: 'Rodney', slot: 'morning' },

Sorry, the diff of this file is not supported yet

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