sort-array
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15665
102
Updatedarray-back@^1.0.3
Updatedobject-get@^2.0.4