# hjh_tools_utils

> 这是hjh自定义的工具包，包含了格式化日期以及转义和还原HTML字符串的相关功能

Latest version **1.0.0** (published 2023-03-08) · ISC license · 0 weekly downloads

## Install

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

## 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 | 2023-03-08 |
| First published | 2023-03-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | hjh |
| Maintainers | hejiahui08 |
| Keywords | hjh, date, tools |

## Links

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

## 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) — 2023-03-08

## README

## 安装
```
npm install hjh_tools_utils
```

## 导入
```js
const tools = require('hjh_tools_utils')
```

## 格式化时间
```js
//对指定日期进行格式化并输出
const date=new Date()
console.log(tools.format(date))
```

## 转义 HTML 中的特殊字符
```js
// 转义 HTML 特殊字符串
// 例如：<h1 title="caption">何家辉</h1> 转义成 &lt;h1 title=&quot;caption&quot;&gt;何家辉&lt;h1&gt;
const htmlStr='<h1 title="caption">何家辉</h1>'
const zhuanhuan=tools.zhuanhuan(htmlStr)
console.log(zhuanhuan)
```

## 还原 HTML 中的特殊字符
```js
// 还原 HTML 特殊字符串
// 例如： &lt;h1 title=&quot;caption&quot;&gt;何家辉&lt;h1&gt;还原成 <h1 title="caption">何家辉</h1>
const htmlStr2='&lt;h1 title=&quot;caption&quot;&gt;何家辉&lt;/h1&gt;'
const huanyuan=tools.huanyuan(htmlStr2)
console.log(huanyuan)
```

## 开源协议
ISC

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