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

/apr-sort-by/

    Package Sidebar

    Install

    npm i apr-sort-by

    Weekly Downloads

    12

    Version

    3.0.3

    License

    MIT

    Last publish

    Collaborators

    • ramitos