# myheima-tools123

> 提供了格式化时间和htmlEscape功能

Latest version **1.0.0** (published 2021-10-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install myheima-tools123
pnpm add myheima-tools123
yarn add myheima-tools123
bun add myheima-tools123
```

## 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-10-26 |
| First published | 2021-10-26 |
| 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 | nanayang |
| Keywords | dateFormat, escape, mytools |

## Links

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

## 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-10-26

## README

##安装方式

```
npm i itheimamytools
```

##导入方式

```
const itheimamytools=require('itheimamytools')
```

##格式化时间

```
//调用dateFormat对时间进行格式化
const date = itheimamytools.dateFormat(new Date())
//输出2021-10-26 18:23:11
console.log(date);
```

##转义 HTML 中的特殊字符

```
//调用htmlEscape转义html字符串
const htmlStr = itheimamytools.htmlEscape("<h1>Hello world</h1>");
//输出&lt;h1&gt;Hello world&lt;/h1&gt;
console.log(htmlStr);
```

##还原 HTML 中的特殊字符

```
//调用htmlUnEscape还原html字符串
const html = itheimamytools.htmlUnEscape("&lt;h1&gt;Hello world&lt;/h1&gt;")
//输出<h1>Hello world</h1>
console.log(html);
```

##开源协议

```
ISC
```

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