alpha-sort:按字母顺序对字符串数组进行排序

时间:2021-04-30 20:40:50
【文件属性】:
文件名称:alpha-sort:按字母顺序对字符串数组进行排序
文件大小:8KB
文件格式:ZIP
更新时间:2021-04-30 20:40:50
JavaScript 字母排序 按字母顺序对字符串数组进行排序 使用正确的unicode字符排序。 支持带选项的。 安装 $ npm install alpha-sort 用法 import alphaSort from 'alpha-sort' ; [ 'b' , 'a' , 'c' ] . sort ( alphaSort ( ) ) ; //=> ['a', 'b', 'c'] [ 'b' , 'a' , 'c' ] . sort ( alphaSort ( { descending : true } ) ) ; //=> ['c', 'b', 'a'] [ 'B' , 'a' , 'C' ] . sort ( alphaSort ( { caseInsensitive : true } ) ) ; //=> ['a', 'B', 'C'] [ 'file10.txt' , 'file2.txt' , '
【文件预览】:
alpha-sort-main
----.gitignore(23B)
----compare.js(2KB)
----package.json(822B)
----.npmrc(19B)
----index.js(1KB)
----test.js(3KB)
----.github()
--------workflows()
----license(1KB)
----readme.md(3KB)
----index.test-d.ts(557B)
----.gitattributes(19B)
----.editorconfig(175B)
----index.d.ts(2KB)

网友评论