# ashow_tools

> 提供了格式化时间，HTMLEscape的功能

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

## Install

```sh
npm install ashow_tools
pnpm add ashow_tools
yarn add ashow_tools
bun add ashow_tools
```

## 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 | 2022-06-16 |
| First published | 2022-06-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ashowlyj |
| Keywords | ashow, dateFormat, escape |

## Links

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

## 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) — 2022-06-16

## README

## 安装
```
npm i ashow_tools
```

## 导入
```javascript
const ashow_tools=require('ashow_tools')
```

## 格式化时间
```js
//调用dateFormat对时间进行格式化
const dtStr=ashow_tools.dateFormat(new Date())
//结果 2022-05-16 21:26:09
console.log(dtStr)
```

## 转义HTML中的特殊字符
```js
//带转换的 HTML 字符串
const htmlstr='<h1>这是h1标签<span>123&nbsp;</span></h1>'
//调用htmlEscape方法进行转换
const htmlstrEscape=ashow_tools.htmlEscape(htmlstr)
//结果 &lt;h1&gt;这是h1标签&lt;span&gt;123&amp;nbsp;&lt;/span&gt;&lt;/h1&gt;
console.log(htmlstrEscape)
```

## 还原HTML中的特殊字符
```js
//调用htmlUnEscape进行还原
const htmlstrUnEscape=ashow_tools.htmlUnEscape(htmlstrEscape)
//结果 <h1>这是h1标签<span>123&nbsp;</span></h1>
console.log(htmlstrUnEscape)
```

## 开源协议
ISC

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