# itheimajw002

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

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

## Install

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

## 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-08-06 |
| First published | 2022-08-06 |
| 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 | jingwen001 |
| Keywords | itheimajw001, HTMLEscape, 格式化时间 |

## Links

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

## 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.0 (latest) — 2022-08-06

## README

<!-- 安装方式、导入方式、格式化时间、转义 HTML 中的特殊字符、还原 HTML 中的特殊字符、开源协议 -->

## 安装方式

```
npm  install itheimajw001
```

## 导入方式

```
const it = require('./itheimajw001')
```

## 格式化时间

```js
//调用dataFormat 对时间进行格式化
const date = it.dataFormat(new Date())
console.log(date)
//结果  2022-08-06 09:40:17
```

## 转义 HTML 中的特殊字符

```js
//带转换的html字符串
const htmlstr = '<h1>哈哈哈&少喝"奶茶"多睡觉</h1>'
//调用htmlescape 方法进行转换
const str = it.HTMLEscape(htmlstr)
console.log(str)
//结果 &lt;h1&gt;哈哈哈&amp;少喝&quot;奶茶&quot;多睡觉&lt;/h1&gt;
```

## 还原字符

```js
//带还原的html字符串
const htmlstrT = '&lth1&gt哈哈哈&amp少喝&quot奶茶&quot多睡觉&lt/h1&gt'
const str2 = it.HTMLUnEscape(htmlstrT)
console.log(str2)
// 结果 <h1>哈哈哈&amp少喝"奶茶"多睡觉</h1>
```

## 开源协议

ISC

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