-
Notifications
You must be signed in to change notification settings - Fork 16
/
sort-on.node.txt
22 lines (16 loc) · 1.96 KB
/
sort-on.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SORT-ON
ALTERNATIVES ==> # - sort-on (preferred with Node, or with VARR, or with locales)
# - deno sort|min|max (preferred with Deno, or with min|max)
VERSION ==> #6.0.0
SORT-ON(VAL_ARR, VAL2[_ARR]) #Sort according to VAL2 among:
->VAL_ARR2 # - FUNC(VAL)->VAL
# - '[-]VARR': same as FUNC(OBJ)->OBJ.VARR
# - if '-', reverse order
# - can contain dots (can be \-escaped) (see dot-prop)
#Uses STR.localeCompare(), i.e. locale-aware
#Sort numbers correctly.
#Creates a shallow copy
#OPTS:
# - locales STR[_ARR], localeOptions OBJ: passed to STR.localeCompare()