npm.io
0.0.5 • Published 7 years ago

sort-array-devfox

Licence
ISC
Version
0.0.5
Deps
0
Size
17 kB
Vulns
0
Weekly
0

Sort string arrays

Installation

npm install sort-array-devfox

Usage

sortStrings(stringArray: string[], options?: SortingOptions)

Possible Options:

  • orderBy which can take "asc" or "desc"
  • isCaseSensitive which can be true or false

Default options are { orderBy: "asc", isCaseSensitive: false }

Case Sensitivity:
Given an Array ["Za", "ma", "Ba", "aa"]

  • with case sensitive true => ["Ba", "Za", "aa", "ma"]
  • with case sensitive false => ["aa", "Ba", "ma", "Za"]

For more usage details see the Unit Tests