1.0.4 • Published 8 years ago

make-sort-key v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

make-sort-key Build Status

Combine several strings to make one sort key.

The following transformations occur:

  • inputs are lowercased,
  • accents are removed,
  • redundant spaces are removed,
  • null, undefined or empty inputs are ignored,
  • finally, resulting strings are concatenated with a space separator.

Installation

npm install --save make-sort-key

Examples

import makeSortKey from 'make-sort-key';

console.log(makeSortKey('Dûpont', 'Jêàn')); // => dupont jean

console.log(makeSortKey(' Apple   Computer  ')); // => apple computer

console.log(makeSortKey('', undefined, 'Apple Computer')); // => apple computer

License

MIT

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

9 years ago

1.0.1

9 years ago