Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including apr-sort-by with all npm packages installed. Try it out:

var aprSortBy = require("apr-sort-by")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

apr-sort-by v3.0.3

Sorts a list by the results of running each coll value through an async iteratee.

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

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free