# eventide_tools

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

Latest version **1.0.0** (published 2022-07-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install eventide_tools
pnpm add eventide_tools
yarn add eventide_tools
bun add eventide_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-07-27 |
| First published | 2022-07-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | eventide1001 |
| Keywords | Eventide, dataeFormat |

## Links

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

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-07-27

## README

## 安装
```
npm install Eventide_tools
```

## 导入
```js
const eventide = require('./Eventide_tools')
```

## 格式化时间
```js
// 调用 dateFormat 对时间进行格式化
const dtStr = eventide.dateFormat(new Date())
// 结果 2022-07-03  20:45:27
console.log(dtStr)
```

## 转义 HTML 中的特殊字符
```js
// 带转换的 HTML 字符串
const htmlStr = '<h1 title="abc">这是h1<span>123&nbsp;</span></h1>'
// 进行转换
const str1 = eventide.htmlEscape(htmlStr)
// 结果 &lt;h1 title=&quot;abc&quot;&gt;这是h1&lt;span&gt;123&amp;nbsp;&lt;/span&gt;&lt;/h1&gt;
console.log(str1)
```

## 还原 HTML 中的特殊字符
```js
// 待还原的字符串
const str2 = eventide.htmlUnEscape(str1)
// 输出的结果 <h1 title="abc">这是h1<span>123&nbsp;</span></h1>
console.log(str2)
```

## 开源协议
ISC

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