Napi
to convert numbers into Chinese format based on Rust
这是一个基于Rust
编写的数字转人民币大写形式的N-API
库。
- Using
pnpm
to install dependencies.
pnpm i
pnpm add --save-dev @types/node
- And Using
pnpm build
to build the project.
pnpm build
The base code from src/rmb_to_rmb.rs
will be compiled into RS-rmbToRMB.SYSTEM_NAME.node
So far, the RS-rmbToRMB
has only been tested on macOS
.
Because the test code depends on ts-jest
, you need to use pnpm
to configure ts-jest
first.
pnpm add --save-dev @types/node @types/jest jest ts-jest nzh
pnpm ts-jest config:init
Then, you can run the test with pnpm test
.
pnpm test