# text-replacer

> It is designed to replaced the text to some other text. It is a very simple library for basic usage

Latest version **1.0.2** (published 2021-06-05) · ISC license · 0 weekly downloads

## Install

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

## 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.2 |
| Published | 2021-06-05 |
| First published | 2021-06-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Farhan M.Baig |
| Maintainers | dan89farhan |
| Keywords | github, text, replacer, text-replacer, regex, custom-text |

## Links

- npm: https://www.npmjs.com/package/text-replacer
- Repository: https://github.com/dan89farhan/text-replacer.git
- Issues: https://github.com/dan89farhan/text-replacer.git/issues
- npm.io page: https://npm.io/package/text-replacer

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-06-05
- 1.0.1 — 2021-06-05
- 1.0.0 — 2021-06-05

## README

# Text-Replace [![NPM version](https://badge.fury.io/js/node-html-parser.png)]

Node.js transform stream that performs text based search and replacements. Since replaceAll method is not defined in nodeJs so I designed this for some usefull use case.

## Installation

npm install text-replacer --save

## Usage

### Streaming search and replace

Let's say we have the following text:

I am here to say you~br~but you don't want to listen

To replace all occurrences of '~br~' with '\<br />' we could do this:

```
const Replacer = require("replace-text");

let replacerConfig = {
"~br~": "<br />",
"~tb~": "<hr />",
};
let replacer = new Replacer(replacerConfig);

replacer.replace("I am here to say you~br~but you don't want to listen");  //I am here to say you<br />but you don't want to listen
```

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