Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

apr-sort-by

3.0.3 • Public • Published

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

install

npm i apr-sort-by

Downloadsweekly downloads

2

version

3.0.3

license

MIT

homepage

apr.js.org

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability