How to use the fast-sort/sort.es5 function in fast-sort

To help you get started, we’ve selected a few fast-sort examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github snovakovic / fast-sort / test / integration / index.js View on Github external
function run(err) {
  if (err) {
    console.error('Problem with installing fast-sort aborting execution', err);
    return;
  }

  const sortDefault = require('fast-sort');
  const sortEs6 = require('fast-sort/sort');
  const sortEs5 = require('fast-sort/sort.es5');
  const sortEs5Min = require('fast-sort/sort.es5.min');

  // sort
  assert.deepEqual(sortDefault([1, 4, 3]).asc(), [1, 3, 4]);
  assert.deepEqual(sortEs6([1, 4, 3]).asc(), [1, 3, 4]);
  assert.deepEqual(sortEs5([1, 4, 3]).asc(), [1, 3, 4]);
  assert.deepEqual(sortEs5Min([1, 4, 3]).asc(), [1, 3, 4]);
  console.log('sort: SUCCESS');
}

fast-sort

Fast easy to use and flexible sorting with TypeScript support

MIT
Latest version published 1 year ago

Package Health Score

57 / 100
Full package analysis