# utils-pe

> 提供格式化时间、HTMLEscape相关功能

Latest version **1.0.0** (published 2022-11-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install utils-pe
pnpm add utils-pe
yarn add utils-pe
bun add utils-pe
```

## 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-11-18 |
| First published | 2022-11-18 |
| 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 | pengfry |
| Keywords | pe, utils, date, farmat, dateFormat, escape |

## Links

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

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-11-18

## README

## 安装
```
npm i utils-pe
```

## 导入
```js
const utilsPe=require('utils-pe')
```

## 时间格式化
```js
const d=new Date()
const newD=utilsPe.dateFormat(d)
console.log(newD) //xxxx-xx-xx xx:xx:xx
```

## 转译 HTML 中的特殊字符
```js
const s='<h1>11235</h1>'
const newS=utilsPe.htmlEscape(s)
console.log(newS)  //&lt;h1&gt;11235&lt;/h1&gt;
```

## 反转译 HTML 中的特殊字符
```js
const s='&lt;h1&gt;11235&lt;/h1&gt;'
const newS=utils.htmlUnEscape(s)
console.log(newS)  //<h1>11235</h1>
```

## 开源协议
ISC

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