# jmd-tools

> 提供了格式化时间,HTMLEscape功能

Latest version **1.0.0** (published 2022-04-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install jmd-tools
pnpm add jmd-tools
yarn add jmd-tools
bun add jmd-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 | 2022-04-18 |
| First published | 2022-04-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | djmdp |
| Keywords | jmd |

## Links

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

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-04-18

## README

## 安装

```
npm install jmd-tools

```

## 导入

```js
const jmd = require("jmd-tools");
```

## 时间格式化

```js
const jmd=require('./jmd-tools')//导入自己创建的包
const time=jmd.dateFormat(new Date())
console.log(time);
// 结果
2022-04-18 16:56:32

```

## 转义 html 字符串

```js
const jmd = require("./jmd-tools");
const str = "<h1><h1>";
const html = jmd.htmlEscape(str);
console.log(html);
//结果
&lt;h1&gt;&lt;h1&gt;
```

## 还原 html 字符

```js
const str = "<h1><h1>";
const html = jmd.htmlEscape(str);
console.log(html);
const str1 = jmd.htmlUnescape(html);
console.log(str1);
//结果
<h1><h1>
```

## 开源协议

ISC

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