# jy-amount-format

> 金额格式化

Latest version **1.0.2** (published 2023-12-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install jy-amount-format
pnpm add jy-amount-format
yarn add jy-amount-format
bun add jy-amount-format
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-12-21 |
| First published | 2023-12-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | lqf |
| Maintainers | cxqdfe |

## Links

- npm: https://www.npmjs.com/package/jy-amount-format
- npm.io page: https://npm.io/package/jy-amount-format

## Recent versions

- 1.0.2 (latest) — 2023-12-21
- 1.0.1 — 2023-12-21

## README

### 安装

```shell
npm i jy-amount-format --save
```

### 引入方式

```javascript
import { formatAmount } from 'jy-amount-format'
```

### 功能说明

```shell
金额格式化
```

### 使用示例

```javascript
import { formatAmount } from 'jy-amount-format'

console.log(formatAmount(1)) // 1.00
console.log(formatAmount(1.2, 2)) // 1.20
console.log(formatAmount(1000, 2)) // 1,000.00
console.log(formatAmount(10000, 3)) // 10,000.000
console.log(formatAmount(8888.88, 13)) // 8,888.8800000000000
console.log(formatAmount(13513518.0000133, 10)) // 13,513,518.0000133000
console.log(formatAmount(-13513518.0000133, 10)) // 13,513,518.0000133000
console.log(formatAmount(-8888.88, 13)) // 8,888.8800000000000
```

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