UNPKG
tamda
Version:
latest (1.0.5)
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Practical functional programming library for TypeScript
github.com/rabelloo/tamda
rabelloo/tamda
tamda
/
src
/
helpers
/
compareString.ts
11 lines
(10 loc)
•
265 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
/**
*
Compares two strings,
`a`
and
`b`
, on equality, greater than or lesser than.
*
@returns
*
- 1 if
`a > b`
*
- -1 if
`b > a`
*
- 0 otherwise
*/ export function compareString(a: string, b: any): -1 | 0 | 1 { return a.localeCompare(b) as any; }