# whisperuse

> 提供了格式化事件、HTMLEscape相关功能

Latest version **1.0.7** (published 2022-04-02) · ISC license · 0 weekly downloads

## Install

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

## 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.7 |
| Published | 2022-04-02 |
| First published | 2022-04-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bingru |
| Keywords | whisper, tool, dataFormat, HTML, escape |

## Links

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

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.7 (latest) — 2022-04-02

## README

##  安装
...
npm install Tools-of-whisper
...
##  导入
...js
const tools = require('Tools-of-whisper')
...

##  格式化时间
...js
<!-- 调用f、dateFormat对时间进行格式化 -->
const dtStr = tools.dateFormat(new Date())
<!-- 结果 2022-04-01  17：26：30 -->
console.log(dtStr)
...
##  转移HTML特殊字符
...js
<!--  待转换的HTML字符串-->
const htmlStr1 = '<h1 tltle="abc">这是h1标签<span>123nbsp;</span></h1>'
<!-- 调用htmlEscape方法进行转换 -->
const str1 = tools.htmlEscape(htmlStr1)
<!-- 转换的结果 &lt;h1 tltle=&quot;abc&quot;&gt;这是h1标签&lt;span&gt;123nbsp;&lt;/span&gt;&lt;/h1&gt;-->
console.log(str1)
...

 
##  还原html中特殊字符
...js
<!-- 待还原的HTML字符串 -->
const htmlStr2 = '&lt;h1 tltle=&quot;abc&quot;&gt;这是h1标签&lt;span&gt;123nbsp;&lt;/span&gt;&lt;/h1&gt;'
const str2 = tools.htmlUnEscape(htmlStr2)
<!-- 输出的结果  <h1 tltle="abc">这是h1标签<span>123nbsp;</span></h1>-->
console.log(str2)
...


## 开源协议
ISC

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