How to use the string-natural-compare function in string-natural-compare

To help you get started, we’ve selected a few string-natural-compare 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 RoboPhred / oni-duplicity / src / pages / SaveEditor / components / Sidebar / components / SaveStructureTree / components / SaveStructureItem / derived-state.ts View on Github external
return childItems.sort((a, b) => {
      const aTitle = getSaveItemTitle(a, saveGame);
      const bTitle = getSaveItemTitle(b, saveGame);
      return naturalCompare(aTitle, bTitle);
    });
  }
github SeleniumHQ / selenium-ide / packages / selenium-ide / src / neo / models / Suite.js View on Github external
      ? this._tests.sort((t1, t2) => naturalCompare(t1.name, t2.name))
      : this._tests

string-natural-compare

Compare alphanumeric strings the same way a human would, using a natural order algorithm

MIT
Latest version published 4 years ago

Package Health Score

65 / 100
Full package analysis

Popular string-natural-compare functions