# more-money

> a demo package

Latest version **1.0.0** (published 2023-06-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install more-money
pnpm add more-money
yarn add more-money
bun add more-money
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-06-06 |
| First published | 2023-06-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mouday |
| Maintainers | mouday |
| Keywords | money |

## Links

- npm: https://www.npmjs.com/package/more-money
- npm.io page: https://npm.io/package/more-money

## Recent versions

- 1.0.0 (latest) — 2023-06-06

## README

# more-money

零依赖的金额转换工具库

安装

```
pnpm i more-money
```

代码示例

```js
import {validateMoney, parseMoney, formatMoney } from "more-money"

// 分 -> 元
formatMoney(1210) // 12.1

// 元 -> 分
parseMoney('12.01') // 1201

// 校验元是否正确
validateMoney("12.001") // false
validateMoney("12.01") // true
```

打包参考

- [创建现代npm包的最佳实践](https://mp.weixin.qq.com/s/3YQl0o0GrnqL5tv1SHu3og)

---
_Source: https://npm.io/package/more-money · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
