{"_id":"@adpro/text-elementalizer-core","_rev":"1-2021f8465031c672e55d61a7d45be6bb","name":"@adpro/text-elementalizer-core","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@adpro/text-elementalizer-core","version":"1.0.0","keywords":["text-elementalizer"],"author":{"name":"Adpro"},"license":"MIT","_id":"@adpro/text-elementalizer-core@1.0.0","maintainers":[{"name":"adpro","email":"adpro_qwq@qq.com"}],"homepage":"https://github.com/adproqwq/text-elementalizer-core","bugs":{"url":"https://github.com/adproqwq/text-elementalizer-core/issues"},"dist":{"shasum":"782aec3f5b9f36f6083e832a4460f12b7e3bb7d9","tarball":"https://registry.npmjs.org/@adpro/text-elementalizer-core/-/text-elementalizer-core-1.0.0.tgz","fileCount":7,"integrity":"sha512-1W7h3fEUZM4j1AzVE0I5hX/F179gJZIxCYwCrMpMUHiNDgkKYdYyA6kMv/uWzQMv25f0nJjz1HaeSCGBaaq58g==","signatures":[{"sig":"MEYCIQCfePCsGflFHx9qEHuwau54bpEjwJSl6bVGQvFWrKQyXAIhAL6DF/5W3HZOwkeT7Xg7umZOF/pzrKKS6ZaV4RIT2301","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7939},"main":"dist/index.js","type":"module","_from":"file:adpro-text-elementalizer-core-1.0.0.tgz","types":"dist/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","getVersion":"tsc --noEmit && tsx ./scripts/version.ts","syncNpmmirror":"tsc --noEmit && tsx ./scripts/syncNpmmirror.ts"},"_npmUser":{"name":"adpro","email":"adpro_qwq@qq.com"},"_resolved":"C:\\Users\\admin\\AppData\\Local\\Temp\\26c890aa6c47b6527f902dda8d200a5c\\adpro-text-elementalizer-core-1.0.0.tgz","_integrity":"sha512-1W7h3fEUZM4j1AzVE0I5hX/F179gJZIxCYwCrMpMUHiNDgkKYdYyA6kMv/uWzQMv25f0nJjz1HaeSCGBaaq58g==","repository":{"url":"git+https://github.com/adproqwq/text-elementalizer-core.git","type":"git"},"_npmVersion":"10.8.1","description":"A text elementalizer replacing the appropriate text with the name of the chemical material based on pinyin.","directories":{},"_nodeVersion":"22.1.0","dependencies":{"pinyin-pro":"^3.24.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.17.0","typescript":"^5.5.4","@types/node":"^22.2.0"},"_npmOperationalInternal":{"tmp":"tmp/text-elementalizer-core_1.0.0_1723617438759_0.4998703532035411","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@adpro/text-elementalizer-core","version":"1.0.1","description":"A text elementalizer replacing the appropriate text with the name of the chemical material based on pinyin.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"repository":{"type":"git","url":"git+https://github.com/adproqwq/text-elementalizer-core.git"},"keywords":["text-elementalizer"],"author":{"name":"Adpro"},"license":"MIT","bugs":{"url":"https://github.com/adproqwq/text-elementalizer-core/issues"},"homepage":"https://github.com/adproqwq/text-elementalizer-core","devDependencies":{"@types/node":"^22.2.0","tsx":"^4.17.0","typescript":"^5.5.4"},"dependencies":{"pinyin-pro":"^3.24.2"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","getVersion":"tsc --noEmit && tsx ./scripts/version.ts","syncNpmmirror":"tsc --noEmit && tsx ./scripts/syncNpmmirror.ts"},"_id":"@adpro/text-elementalizer-core@1.0.1","_integrity":"sha512-nBXYWTfr+zCO+FNCA/55FJnfZGjPcqAjK5ZM88BKyCTVQMeqz0B8Q5seCOflKkOnPWQe90UMYF/rHUw3KeYGQg==","_resolved":"C:\\Users\\admin\\AppData\\Local\\Temp\\c2a1ca5a3cb11529941b15849915b4d4\\adpro-text-elementalizer-core-1.0.1.tgz","_from":"file:adpro-text-elementalizer-core-1.0.1.tgz","_nodeVersion":"22.1.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-nBXYWTfr+zCO+FNCA/55FJnfZGjPcqAjK5ZM88BKyCTVQMeqz0B8Q5seCOflKkOnPWQe90UMYF/rHUw3KeYGQg==","shasum":"0fce29c78320a9dd6ba9aab4e97838b57b27a68f","tarball":"https://registry.npmjs.org/@adpro/text-elementalizer-core/-/text-elementalizer-core-1.0.1.tgz","fileCount":7,"unpackedSize":9784,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcyNn/8sMLY2eCuSevYcczCdBvqmnFXFVmlF5PHZ6LOQIhAN4Nywg2QYkXKfauSVLoinjJPsiK3juE40t9z81GJPjp"}]},"_npmUser":{"name":"adpro","email":"adpro_qwq@qq.com"},"directories":{},"maintainers":[{"name":"adpro","email":"adpro_qwq@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-elementalizer-core_1.0.1_1723619291599_0.2951176586814801"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-14T06:37:18.621Z","modified":"2024-08-14T07:08:11.939Z","1.0.0":"2024-08-14T06:37:18.879Z","1.0.1":"2024-08-14T07:08:11.765Z"},"bugs":{"url":"https://github.com/adproqwq/text-elementalizer-core/issues"},"author":{"name":"Adpro"},"license":"MIT","homepage":"https://github.com/adproqwq/text-elementalizer-core","keywords":["text-elementalizer"],"repository":{"type":"git","url":"git+https://github.com/adproqwq/text-elementalizer-core.git"},"description":"A text elementalizer replacing the appropriate text with the name of the chemical material based on pinyin.","maintainers":[{"name":"adpro","email":"adpro_qwq@qq.com"}],"readme":"# text-elementalizer-core\r\n\r\nA text elementalizer replacing the appropriate text with the name of the chemical material based on pinyin.\r\n\r\n基于汉语拼音，将文本中的中文字符替换为对应的化学物质名称。\r\n\r\n基于汉语拼铟，将文苯中锝中文字氟锑换为对荧锝化学芴酯名称。\r\n\r\n## 开始使用\r\n\r\n```shell\r\nnpm install @adpro/text-elementalizer-core\r\n```\r\n\r\n本包完全使用`TypeScript`编写，遵循`ES6`规范，使用`pnpm`作为包管理器。\r\n\r\n### 方法\r\n\r\n#### convert\r\n\r\n`convert`方法接受1-2个参数。\r\n\r\ntext - `string` - 待转换的文本\r\n\r\nignoreTones（可选） - `boolean` - 是否模糊音调。默认为`false`\r\n\r\n`convert`方法返回1个`string`类型的值，值的内容为转换后的字符串\r\n\r\n使用示例：\r\n\r\n```typescript\r\nimport { convert } from '@adpro/text-elementalizer-core';\r\n\r\nconst example1 = convert('示例'); // 不模糊音调\r\nconst example2 = convert('示例', false); // 不模糊音调\r\nconst example3 = convert('示例', true); // 模糊音调\r\n```\r\n\r\n### 常量\r\n\r\n#### withTonesDict\r\n\r\n`withTonesDict`是一个包含不模糊声调和对应化学用字的`Map`。\r\n\r\n其存储方式为：`string`类型的拼音:`string[]`类型的多个对应化学用字\r\n\r\n导入方式：\r\n\r\n```typescript\r\nimport { withTonesDict } from '@adpro/text-elementalizer-core/dict';\r\n```\r\n\r\n#### withoutTonesDict\r\n\r\n`withoutTonesDict`是一个包含模糊声调和对应化学用字的`Map`。\r\n\r\n其存储方式为：`string`类型的拼音:`string[]`类型的多个对应化学用字\r\n\r\n导入方式：\r\n\r\n```typescript\r\nimport { withoutTonesDict } from '@adpro/text-elementalizer-core/dict';\r\n```\r\n\r\n#### excludeList\r\n\r\n`excludeList`是一个`string[]`类型的包含不应被转换的特殊字符的数组。\r\n\r\n导入方式：\r\n\r\n```typescript\r\nimport { excludeList } from '@adpro/text-elementalizer-core/dict';\r\n```","readmeFilename":"README.md"}