# fly-utils-2021

> 格式化时间和 html 转义的方法

Latest version **1.0.0** (published 2021-02-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install fly-utils-2021
pnpm add fly-utils-2021
yarn add fly-utils-2021
bun add fly-utils-2021
```

## 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.0 |
| Published | 2021-02-12 |
| First published | 2021-02-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | yu2021 |
| Maintainers | yu2021 |
| Keywords | dateFormat, escape |

## Links

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

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2021-02-12

## README

## fly-utils 包的说明文档

## 安装
```
npm install fly-utils
```

## 用法

### 1.1 引入包
```
const utils = require('fly-utils')
```

### 1.2 格式化时间用法
```
const dateStr = formatDate(new Date())
console.log(dateStr) // 2021-01-01
```

### 1.3 转义 html 标签字符
```
const str = utils.htmlEscape('<h1>hello "123" &&</h1>')
console.log(str)
```

### 1.3 还原 html 的标签字符

```
const str = utils.htmlEscape('<h1>hello "123" &&</h1>')
console.log(str)

console.log(utils.htmlUnescape(str))
```

## 开源协议
ISC

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