How to use sort-any - 1 common examples

To help you get started, we’ve selected a few sort-any 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 oprogramador / deep-equal-in-any-order / src / index.js View on Github external
const sortDeep = (object) => {
  if (!Array.isArray(object)) {
    if (!(typeof object === 'object') || object === null) {
      return object;
    }

    return _.mapValues(object, sortDeep);
  }

  return sortAny(object.map(sortDeep));
};

sort-any

Sorts any JavaScript array in a predictable way (deep equal arrays are always sorted in the same order)

MIT
Latest version published 9 months ago

Package Health Score

60 / 100
Full package analysis

Popular sort-any functions