# shanglv-utils

> common toolkit

Latest version **1.0.1** (published 2021-12-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install shanglv-utils
pnpm add shanglv-utils
yarn add shanglv-utils
bun add shanglv-utils
```

## 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.1 |
| Published | 2021-12-07 |
| First published | 2021-12-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zptime |
| Maintainers | zptime |

## Links

- npm: https://www.npmjs.com/package/shanglv-utils
- npm.io page: https://npm.io/package/shanglv-utils

## Recent versions

- 1.0.1 (latest) — 2021-12-07
- 1.0.0 — 2021-12-07

## README

# shanglv-utils

> 常用工具函数库

## 工具函数介绍

- Format（格式化）
  - formatMoney(money, symbol, decimals)：金额格式化
    - money： number 金额数
    - symbol： string 金额符号
    - decimals： number 保留小数点位数
- Validate（校验）
  - mobileCheck(value)：手机号校验
  - IDCardCheck(value)：身份证校验
  - emailCheck(value)：邮箱校验

## 安装及使用

```js
// 安装
npm install shanglv-utils

// 使用
import { Format, Validate } from "shanglv-utils";

Format.formatMoney(12341234.246, "$", 2); // $12,341,234.25
Validate.mobileCheck("123456"); // false
```

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