# gx-tools

> 提供了 格式化时间 HTML Escape相关的功能

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

## Install

```sh
npm install gx-tools
pnpm add gx-tools
yarn add gx-tools
bun add gx-tools
```

## 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-07 |
| First published | 2023-03-07 |
| 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 | open.script |
| Keywords | gx, dateFormat, Escape |

## Links

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

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

## README

## 安装
```
npm install gx-tools
```

## 导入
```js
const gx_tools = require('./gx-tools');
```

## 格式化时间
```js
// 调用dateFormat 对时间进行格式化
const data = my_tools.dateFormat(new Date());
console.log(data);
//结果：2023-03-7 16:47:05
```

## 转义html的特殊字符
```js
// 调用htmlEscape 对用户输入的特殊字符进行转义
let str = '<h1>1111111</h1>'
const newStr = my_tools.htmlEscape(str);
console.log(newStr);
//结果：&lt;h1&gt;1111111&lt;/h1&gt;
```

## 还原html
```js
// 调用 htmlUnEscaped 对转义过的字符进行恢复
const newsStr = my_tools.htmlUnEscape(newStr);
console.log(newsStr);
// 结果：<h1>1111111</h1>
```

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