# webfront-easy-builder

> 提供了格式化时间，转义HTML语句的功能

Latest version **1.0.1** (published 2022-07-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install webfront-easy-builder
pnpm add webfront-easy-builder
yarn add webfront-easy-builder
bun add webfront-easy-builder
```

## 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 | 2022-07-25 |
| First published | 2022-07-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | luckymouse |
| Keywords | webfront-easy-builder, dateFormat, escape |

## Links

- npm: https://www.npmjs.com/package/webfront-easy-builder
- npm.io page: https://npm.io/package/webfront-easy-builder

## 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) — 2022-07-25
- 1.0.0 — 2022-07-25

## README

# 工具介绍

 > 这个包有格式化时间、转义HTML语句和还原HTML语句的功能，可以帮助网站开发者更快地完成开发
 这是我的练习项目 <br />
 有三个方法，分别是dateFormat，htmlEscape和htmlUnEscape

---

# 使用方法

## 安装

    npm i easy-tools

## 导入（后面的演示都是建立在导入的基础之上）

``` js
// 引入包
const tools = require('webfront-easy-builder');
```

## 格式化时间

```js
// 调用 dateFormat 对时间格式化
const date = dateFormat(new Date()); // 这就已经格式化完成了
```

## 转义HTML字符（可以帮助开发者更好的预防xss攻击或误输入）

```js
// 调用 htmlEscape 转义 html 字符
const htmlStr = "<h1>hello world</h1>"; // 需要转义的字符串
const str = htmlEscape(htmlStr); // 转义完成
```

## 还原HTML字符（就是把上面转义好的字符串再变成可以阅读的形式）

```js
// 调用 htmlUnEscape，将转义完成的字符再转回来
const str = "&lt;1&gt;hello world&lt;/1&gt;";
const unEscapeStr = htmlUnEscape(str); // 转义完成
```

## 开源协议
ISC

## BUG修复

 - 1.0.1:修复了文档示例不全面的问题

## 新增功能

 - 目前没有新增功能

## 版本更新

 - 基础版本，没有更新

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