How to use the string-natural-compare.caseInsensitive 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 laurent22 / joplin / ReactNativeClient / lib / components / screens / NoteTagsDialog.js View on Github external
tagListData.sort((a, b) => {
			return naturalCompare.caseInsensitive(a.title, b.title);
		});
github bartveneman / css-analyzer-diff / src / diff-lists.js View on Github external
	return (a, b) => caseInsensitiveCompare(a, b)
}
github oVirt / ovirt-web-ui / src / components / VmsListNavigation / index.js View on Github external
      .sort((vmA, vmB) => naturalCompare.caseInsensitive(vmA.get('name'), vmB.get('name')))
github projectwallace / css-analyzer / src / analyzer / selectors / identifiers.js View on Github external
function sortByIdentifiersCount(a, b) {
  if (a.count === b.count) {
    return stringCompare(a.value, b.value)
  }

  return b.count - a.count
}
github projectwallace / css-analyzer / src / analyzer / rules / index.js View on Github external
.sort((a, b) => {
      if (a.selectors.length === b.selectors.length) {
        return compareStrings.caseInsensitive(
          a.selectors.join(''),
          b.selectors.join('')
        )
      }

      return a.selectors.length - b.selectors.length
    })
  const ruleWithLeastSelectors = [...rulesSortedBySelectorCount].shift()

string-natural-compare

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

MIT
Latest version published 5 years ago

Package Health Score

65 / 100
Full package analysis

Popular string-natural-compare functions