apr-sort-by
v3.0.3
Published
Sorts a list by the results of running each coll value through an async iteratee.
Downloads
8
Maintainers
Readme
sort-by
Sorts a list by the results of running each coll
value through an async iteratee
.
Parameters
Examples
import awaitify from 'apr-awaitify';
import sortBy from 'apr-sort-by';
const stat = awaitify(fs.stat);
const files = [
'file1',
'file2',
'file3'
];
const sorted = await sortBy(files, await (file) => {
const { mtime } = await stat(file);
return mtime;
});
Returns Promise
limit
Parameters
Returns Promise
series
Parameters
Returns Promise