# yyl-replacer

> replace lib

Latest version **0.3.1** (published 2020-04-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install yyl-replacer
pnpm add yyl-replacer
yarn add yyl-replacer
bun add yyl-replacer
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2020-04-08 |
| First published | 2019-02-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 8.0.0 |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jackness |
| Maintainers | jackness |

## Links

- npm: https://www.npmjs.com/package/yyl-replacer
- Repository: https://github.com/jackness1208/yyl-replacer
- Homepage: https://github.com/jackness1208/yyl-replacer#readme
- Issues: https://github.com/jackness1208/yyl-replacer/issues
- npm.io page: https://npm.io/package/yyl-replacer

## Recent versions

- 0.3.1 (latest) — 2020-04-08
- 0.3.0 — 2020-04-08
- 0.2.1 — 2019-09-16
- 0.2.0 — 2019-03-12
- 0.1.0 — 2019-02-28

## README

# yyl-replacer

## 引用
```
const rp = require('yyl-replacer');
```

## API
### rp.dataRender(cnt, data);
```
/**
 * 内容替换 约定内容中变量格式为 __data('keyword') or __data('first.second') 的形式
 * @param  {String} cnt  需要替换的内容
 * @param  {Object} data 数据对象
 * @return {String} r    替换的结果
 */
rp.dataRender(cnt, data);
```

### rp.REG.SUGAR_DATA
```
/**
 * data 匹配用正则
 * @return {RegExp}
 */
rp.REG.SUGAR_DATA
```

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