gm-util 5.12.9 → 5.12.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/pinyin.js +3 -2
package/package.json
CHANGED
package/src/pinyin.js
CHANGED
|
@@ -703,8 +703,9 @@ const pinyin = (source, style) => {
|
|
|
703
703
|
if (compareResult < 0) {
|
|
704
704
|
index--
|
|
705
705
|
}
|
|
706
|
-
|
|
707
|
-
|
|
706
|
+
const targetPinyin = pinyins[index] || ''
|
|
707
|
+
cache[target] = targetPinyin
|
|
708
|
+
return (style === 'first_letter') ? targetPinyin.charAt(0) : targetPinyin
|
|
708
709
|
}
|
|
709
710
|
|
|
710
711
|
const _pinyin = (source, style) => {
|