{"_id":"@edgeros/jsre-pinyin4js","_rev":"20-6d7722f8e17780b52292112e37fd097d","name":"@edgeros/jsre-pinyin4js","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@edgeros/jsre-pinyin4js","version":"1.0.0","keywords":["pinyin","conversion","拼音","汉字","jsre"],"license":"MIT","_id":"@edgeros/jsre-pinyin4js@1.0.0","maintainers":[{"name":"liping-acoinfo.cn","email":"liping@acoinfo.com"},{"name":"clarkttfu","email":"clarkttfu@gmail.com"}],"dist":{"shasum":"c4d60599bd06acf732f9f7ea873c93dc9f708c7d","tarball":"https://registry.npmjs.org/@edgeros/jsre-pinyin4js/-/jsre-pinyin4js-1.0.0.tgz","fileCount":10,"integrity":"sha512-YVxKILINkuRFAtPSyVH2DM4TTVbzekdAybp/JKZgMeky2TZ3Y26rSJuFMVzOmhijc2xvS85VgaARPov5PmUltA==","signatures":[{"sig":"MEUCIHnpOCTRPw4D25DK/TyV0lQik4LQZ2VQAMxwS9TzerEMAiEAuhbbk2vTU+vs/5/teH/JqTDFccMeAtaaEXwW3yvagIY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":479649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnSa7CRA9TVsSAnZWagAA0ZkP/0Ngj6HBZXvF9meG2bjJ\nZvRwHXMbtJWkKDLExrJF7/6rfHMJwoBg+rL6oXXyc/M/PShmS9w2eB6xMMGs\nG62d8WnRpdPetXvYZa5Afo8XcLobaNP/0RU9M7mKdyXzLj9TTIfh/NjuJWsA\ns3S8Xz+y0v+tLE8kG6Cc67iFQTkmQpTnGFUx/p3cpmtj43ykplvZZMz8AOT9\n0XXNMwZ64GghaWJNbVDo53JEslP3tN7QqdRUF4iv2Y9dSIieEOKpzMcx2iAN\n5js9I1711v2Q55E+L/EH6Hxk9KO4MES86kTaCXtHotr4Md5egEzDOKJfKB9T\nebPYI2PNiHua6tXtM8rRMuTv1U74tyTNYB9eNasvBHLCPaZUbUYWlK6E+ikZ\nlpvPMscApTkosfFyAC73/feafG7tCeTvucUlY0dGg2FvB1N56UPlzkniIMkg\n1Tfr20cf0FLh/Wgt3OZ3Nqorjf3ENPl2A4asQPbHN1LyjeAdtcS/godNCVaF\nGf1IYyI9mrQyBvg527dV+OHl6x2j1muN2FSVFGHR0UP9I8EvcFEYi/gXCAoK\ncU1IWCSuPWt09unXxzwwAGJN8jYHBwO79yEBLR90v0F6i9njU0X1ECg7BO2w\nECN1Io/6+VYbv4FnokVZjPFv7iKTsWqWU8ri9bATMhLWKmxIwuVwAJYaYkdf\npw+3\r\n=gWpC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","_npmUser":{"name":"liping-acoinfo.cn","email":"liping@acoinfo.com"},"_npmVersion":"6.14.13","description":"A javascript library for converting chinese to pinyin.","directories":{},"_nodeVersion":"14.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jsre-pinyin4js_1.0.0_1620911803215_0.05967502888655862","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-05-13T13:16:42.813Z","modified":"2025-03-18T06:34:57.513Z","1.0.0":"2021-05-13T13:16:43.436Z"},"license":"MIT","keywords":["pinyin","conversion","拼音","汉字","jsre"],"description":"A javascript library for converting chinese to pinyin.","maintainers":[{"email":"clarkttfu@gmail.com","name":"clarkttfu"},{"email":"epmbot@edgeros.com","name":"epmbot"},{"email":"xieyuanbin@acoinfo.com","name":"xieyuanbin"},{"email":"chengyongbin@acoinfo.com","name":"chengyonbin"}],"readme":"# Overview\nA opensource javascript library for converting chinese to pinyin. Features:\n\n**Zero dependency**\n\n**Thesaurus can be imported and packaged flexibly** \nYou can adjust the dictionary by yourself, refer to src/dict for details; all resource calls are encapsulated by PinyinResource, and can be modified and packaged by yourself\n\n**Accurate and perfect font library**\nUnicode code from 4E00-9FA5 range and 3007 (〇) 20903 Chinese characters, pinyin4js can convert all Chinese characters except 46 variants (there is no standard pinyin for variants).\n\n**Fast Pinyin conversion speed**\nAfter testing, pinyin4js takes about 110 milliseconds for 20902 Chinese characters ranging from 4E00-9FA5.\n\n**Multi-pinyin format output support**\nSupport multiple pinyin output formats: with phonetic symbols, without phonetic symbols, numbers for phonetic symbols, and pinyin first letter output formats.\n\n**Common polyphonic word recognition**\nSupport the recognition of common polyphonic characters, including phrases, idioms, place names, etc.\n\n**Simplified Traditional Chinese Conversion**\n\n**Support adding custom dictionaries**\nSupport adding user-defined dictionaries.\n\nUser can use the following code to import the `pinyin4js`  module .\n``` javascript\nvar pinyin4js = require('pinyin4js');\n```\n\n# Support\nThe following shows `pinyin4js` module APIs avaliable for each permissions.\n\n&nbsp;|User Mode|Privilege Mode\n--|:--:|:--:\npinyin4js.pinyinFormat|●|●\npinyin4js.pinyinHelper|●|●\npinyinHelper.convertToPinyinString|●|●\npinyinHelper.getShortPinyin|●|●\npinyinHelper.hasMultiPinyin|●|●\n\n# Pinyin4js Object\n## pinyin4js.pinyinFormat\n+ *{Object}* Pinyin tone format options. Optons:\n\t+ WITH_TONE_MARK:  With tone.\n\t+ WITHOUT_TONE:  Without tone.\n\t+ WITH_TONE_NUMBER:  The number represents the tone of the voice.\n\t+ FIRST_LETTER:  Acronym style.\n\n## pinyin4js.pinyinHelper\n+ *{Object}* This object has some methods to convert Chinese characters into pinyin.\n\n# PinyinHelper Object\n## pinyinHelper.convertToPinyinString(str, separator, format)\n+ `str` *{String}* Chinese characters to be converted.\n+ `separator` *{String}* Separator between each pinyin.\n+ `format` *{PinyinFormat}* Pinyin format:\n\t+ pinyin4js.pinyinFormat.WITH_TONE_NUMBER -- digits represent tones;\n\t+ pinyin4js.pinyinFormat.WITHOUT_TONE -- has no tones;\n\t+ pinyin4js.pinyinFormat.WITH_TONE_MARK -- has tones.\n+ Returns: *{String}* Result string.\n\nConvert the string to Pinyin in the corresponding format.\n\n## Example\n```javascript\nconst {pinyinHelper, pinyinFormat} = require('pinyin4js');\n\nvar result = pinyinHelper.convertToPinyinString('你好世界', '-', pinyinFormat.WITHOUT_TONE);\nconsole.log('get pinyin:', result);\n```\n\n## pinyinHelper.getShortPinyin(str)\n+ `str` *{String}* Chinese characters to be converted.\n+ Returns: *{String}* Result string.\n\nGet the first letter of the string corresponding to Pinyin.\n\n## Example\n```javascript\nconst {pinyinHelper} = require('pinyin4js');\n\nvar result = pinyinHelper.getShortPinyin('你好世界');\nconsole.log('get first char:', result);\n```\n\n## pinyinHelper.hasMultiPinyin(char)\n+ `char` *{Char}* Chinese character to be check.\n+ Returns: *{Boolean}* Judeg result.\n\nJudge whether a Chinese character is polysyllabic or not.\n\n## Example\n```javascript\nconst {pinyinHelper} = require('pinyin4js');\n\nvar result = pinyinHelper.hasMultiPinyin('长');\nconsole.log('Whether it is polysyllabic or not:', result);\n```\n\n---\n","readmeFilename":"README.md"}