UNPKG
tiny-pinyin
Version:
latest (1.3.2)
1.3.2
1.3.1
1.3.0
1.2.1
1.2.0
1.1.0
1.0.0
convert hanzi to pinyin
github.com/creeperyang/pinyin
creeperyang/pinyin
tiny-pinyin
/
src
/
index.js
12 lines
(8 loc)
•
290 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
'use strict'
const
pinyin =
require
(
'./core'
)
const
patcher56L =
require
(
'./patchers/56l'
)
// Patch dict for icudt56l.dat related env, such as safari|node v4.
if
(pinyin.
isSupported
() && patcher56L.
shouldPatch
(pinyin.
genToken
)) { pinyin.
patchDict
(patcher56L) }
module
.
exports
= pinyin