chore(core)(docs): drop pinyin (#7780)

This commit is contained in:
fengkx
2021-06-28 22:39:17 -07:00
committed by GitHub
parent 40985a812f
commit bdccede8ab
11 changed files with 26106 additions and 638 deletions
+2 -3
View File
@@ -1,6 +1,5 @@
const file = require('./file');
const pinyin = require('pinyin');
const pinyinCompare = new Intl.Collator('zh-Hans-CN-u-co-pinyin').compare;
const isASCII = (str) => /^[\x00-\x7F]*$/.test(str);
module.exports = {
@@ -41,7 +40,7 @@ module.exports = {
} else if (ia || ib) {
return ia > ib ? -1 : 1;
} else {
return pinyin.compare(a.title, b.title);
return pinyinCompare(a.title, b.title);
}
})
.map((x) => x.content.join('\n'))