Skip to content

Commit f5d1075

Browse files
committed
add contributor, remove unsupported node versions from travis, update docs
1 parent 7690a86 commit f5d1075

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: node_js
22
node_js:
33
- 6
4-
- 7
54
- 8
6-
- 9
75
- 10
86
- 11

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ const sortBy = require('sort-array')
1515
```
1616
<a name="exp_module_sort-array--sortBy"></a>
1717

18-
### sortBy(recordset, columnNames, [customOrder]) ⇒ <code>Array</code> ⏏
18+
### sortBy(recordset, sortBy, [customOrder]) ⇒ <code>Array</code> ⏏
1919
**Kind**: Exported function
2020

2121
| Param | Type | Description |
2222
| --- | --- | --- |
2323
| recordset | <code>Array.&lt;object&gt;</code> | Input array of objects |
24-
| columnNames | <code>string</code> \| <code>Array.&lt;string&gt;</code> | One or more property expressions to sort by, e.g. `'name'` or `'name.first'`. |
24+
| sortBy | <code>string</code> \| <code>Array.&lt;string&gt;</code> | One or more property expressions to sort by, e.g. `'name'` or `'name.first'`. |
2525
| [customOrder] | <code>object</code> | Custom sort order definitions. An object where each key is the property expression and the value is an array specifying the sort order. Example: <br> `{ importance: [ 'speed', 'strength', 'intelligence' ]}` |
2626

2727
**Example**

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const arrayify = require('array-back')
21
const t = require('typical')
32

43
/**
@@ -91,6 +90,8 @@ module.exports = sortBy
9190
* ```
9291
*/
9392
function sortBy (recordset, sortBy, sortTypes, namedConfigs) {
93+
const arrayify = require('array-back')
94+
9495
// First stage data preparation
9596
recordset = arrayify(recordset)
9697
sortBy = arrayify(sortBy)

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"name": "sort-array",
33
"author": "Lloyd Brookes <75pound@gmail.com>",
4+
"contributors": [
5+
"Ben Vickers <bjvickers@protonmail.com>"
6+
],
47
"version": "2.0.0",
58
"description": "Sort an array of objects by any property value, at any depth, in any custom order.",
69
"repository": "https://github.com/75lb/sort-array.git",

0 commit comments

Comments
 (0)