clay-list-sorter
Sorter functions for ClayDB list
Installation
$ npm install clay-list-sorter --save
Usage
'use strict' const sortArray = let source = name: 'foo' index: 2 name: 'bar' index: 1 let sort = 'index' let sorted = console // -> [ { name: 'bar', index: 1 }, { name: 'foo', index: 2 } ]
Functions
Available functions
Signature | Description |
---|---|
sortArray(array, conditions) -> Object[] |
Sort array with condition |
License
This software is released under the Apache-2.0 License.