# itheima-icu

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

Latest version **1.0.0** (published 2021-12-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install itheima-icu
pnpm add itheima-icu
yarn add itheima-icu
bun add itheima-icu
```

## 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-12-05 |
| First published | 2021-12-05 |
| 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 | icu-007 |
| Keywords | itheima, escape, icu |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2021-12-05

## README

##安装方式

```js
npm install itheima-icu
```

##导入方式

```js
const itheima = require("itheima-icu");
```

##格式化时间

```js
// 调用setTime方法  格式化时间
const time = itheima.setTime(new Date());
// 2021-12-04  21:17:23
console.log(time);
```

##转义 HTML 中的特殊字符

```js
let str = '<h1 title="我是一个测试">我只是一个测试&nbsp;&nbsp;</h1>';
const hm = itheima.htmlEscape(str);
// &lt;h1 title=&quot;我是一个测试&quot;&gt;我只是一个测试&amp;nbsp;&amp;nbsp;&lt;/h1&gt;
console.log(hm);
```

##还原 HTML 中的特殊字符

```js
let hm=&lt;h1 title=&quot;我是一个测试&quot;&gt;我只是一个测试&amp;nbsp;&amp;nbsp;&lt;/h1&gt;
const hm1 = itheima.unhtmlEscape(hm);
// <h1 title="我是一个测试">我只是一个测试&nbsp;&nbsp;</h1>
console.log(hm1);
```

##开源协议
ISC

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