# syz-time-format

> 提供的时间转换功能，html标签转义功能

Latest version **1.0.0** (published 2023-01-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install syz-time-format
pnpm add syz-time-format
yarn add syz-time-format
bun add syz-time-format
```

## 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-01-18 |
| First published | 2023-01-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | syz |
| Maintainers | syz20000115 |
| Keywords | syz, format, escape |

## Links

- npm: https://www.npmjs.com/package/syz-time-format
- npm.io page: https://npm.io/package/syz-time-format

## 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-01-18

## README

## 安装
> npm install syz-time-format
## 导入方式
> const syz = require('syz-time-format')
## 本包一共三个方法

- 格式化时间方法
``` javaScript
    const syz = require('syz-time-format')
  //  调用包上的format方法即可转换时间戳
    syz.format(new Date())
  // 当前时间为2023-01-18 11:19:29
```
- 转义和还原html字符串
``` javaScript
    const syz = require('syz-time-format')
    const htmlStr = '<h1 class="abc">你好啊&nbsp;node.js</h1>'
   // 转义html的方法
    syz.htmlEscape(htmlStr));
   // &lt;h1 class=&quot;abc&quot;&gt;你好啊&amp;nbsp;node.js&lt;/h1&gt; 
   // 还原html的方法
    syz.htmlUnEscape(htmlStr);
   // <h1 class="abc">你好啊&nbsp;node.js</h1> 
```
## 开源协议
ISC

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