# rg-tools

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

Latest version **1.0.1** (published 2023-04-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install rg-tools
pnpm add rg-tools
yarn add rg-tools
bun add rg-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.1 |
| Published | 2023-04-12 |
| First published | 2023-04-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | rangogiddap |
| Keywords | Rango, dateFormat, escape |

## Links

- npm: https://www.npmjs.com/package/rg-tools
- npm.io page: https://npm.io/package/rg-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.1 (latest) — 2023-04-12
- 1.0.0 — 2023-04-12

## README

## 安装

```bash
npm install rg-tools
```

## 导入

```js
const rango = require('rg-tools')
```

## 格式化时间

```js
// 调用 dateFormat 对时间进行格式化
let getTime = getDate.dateFormat(new Date())
// 打印结果
console.log(getTime) // 2023-04-11 20:08:55
```

## 转义 HTML 中的特殊字符

```js
// 需转义的 HTML 字符串
let htmlStr = '<a href="#">链接标签</a>'
// 调用 htmlEscape 方法进行转义
let getStr = getDate.htmlEscape(htmlStr)
// 打印结果
console.log(getStr) // &lt;a href=&quot;#&quot;&gt;链接标签&lt;/a&gt;
```

## 还原 HTML 中的特殊字符

```js
// 调用 htmlEscape 方法进行还原
let unStr = getDate.htmlUnEscape(getStr)
// 打印结果
console.log(getStr) // <a href="#">链接标签</a>
```

## 开源协议

 ISC

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