Package Exports
- @ctsy/chinese
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ctsy/chinese) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
中文数字和阿拉伯数字互转函数库
安装/install
npm install @ctsy/chinese
npx install @ctsy/chinese
yarn add @ctsy/chinese使用/use
import {chinese2number,number2chinese} from '@ctsy/chinese'
let chinese = "叁仟伍佰元整"
let num = chinese2number(chinese);// num = 3500
// 简体模式
let simpleChinese = number2chinese(num,true) // 三千五百
// 繁体模式
let traChinese = number2chinese(num) // 叁仟伍佰欢迎使用。目前在中文转数字大于百万时似乎有问题。请联系castle@tansuyun.cn