# dch-utils01

> 这是一个格式化时间和转义html标签的包

Latest version **1.0.0** (published 2021-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install dch-utils01
pnpm add dch-utils01
yarn add dch-utils01
bun add dch-utils01
```

## 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-21 |
| First published | 2021-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 714.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | dch |
| Maintainers | dch5023 |
| Keywords | format, escape, dch-utils |

## Links

- npm: https://www.npmjs.com/package/dch-utils01
- npm.io page: https://npm.io/package/dch-utils01

## 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-21

## README

## 1.安装
```
npm i dch-utils
```

## 2.引入
```js
const utils = require('dch-utils');
```

## 3. 使用
- 3.1 调用格式化时间的函数
```js
const dt = utils.dateFormat(new Date);
//2021-2-21 15:52:26
console.log(dt);
```
- 3.2 调用转义html标签的方法
```js
const res = utils.escapeHTML('<span style="color:red">hello&nbsp</span>');
//&lt;span style=&quot;color:red&quot;&gt;hello&amp;nbsp&lt;/span&gt;
console.log(res);
```
- 3.3 调用还原html标签的方法
```js
const res2 = utils.unEscapeHTML('&lt;span style=&quot;color:red&quot;&gt;hello&amp;nbsp&lt;/span&gt;');
//<span style="color:red">hello&nbsp</span>
console.log(res2);
```
## 4.协议
MIT

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