# just-replace-all

> replace all occurrences of a string within a string with another string

Latest version **2.2.0** (published 2022-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install just-replace-all
pnpm add just-replace-all
yarn add just-replace-all
bun add just-replace-all
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2022-12-17 |
| First published | 2020-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6190 |
| Author | Tom Wuttke |
| Maintainers | angus-c |
| Keywords | replace, all, string, no-dependencies, just |

## Links

- npm: https://www.npmjs.com/package/just-replace-all
- Repository: https://github.com/angus-c/just
- Homepage: https://github.com/angus-c/just#readme
- Issues: https://github.com/angus-c/just/issues
- npm.io page: https://npm.io/package/just-replace-all

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 2.2.0 (latest) — 2022-12-17
- 2.1.1 — 2022-08-08
- 2.1.0 — 2022-08-07
- 2.0.1 — 2021-11-13
- 2.0.0 — 2021-11-09
- 1.2.1 — 2021-11-01
- 1.2.0 — 2021-10-31
- 1.1.0 — 2021-10-30
- 1.0.0 — 2020-02-25

## README

<!-- DO NOT EDIT THIS FILE! THIS FILE WAS AUTOGENERATED BY TEMPLATE-MATE -->
<!-- SEE https://github.com/angus-c/just/blob/master/CONTRIBUTING.md#readme-template -->

## just-replace-all

Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for every occasion.

[`🍦 Try it`](https://anguscroll.com/just/just-replace-all)

```shell
npm install just-replace-all
```
```shell
yarn add just-replace-all
```

Replace all occurrences of a string within a string with another string

```js
  import replaceAll from 'just-replace-all';

/*
  replaceAll('hello, world', 'l', 'q'); // 'heqqo, worqd'
  replaceAll('hello, world', 'l', 'qq'); // 'heqqqqo, worqqd'
  replaceAll('hello, world', 'll', 'q'); // 'heqo, world'
  replaceAll('hello, world', '', 'q'); // 'hello, world'
  replaceAll('hello, world', 'l', ''); // 'heo, word'
  replaceAll('hello, world', null, 'q'); // 'hello, world'
  replaceAll('hello, world', 'l'); // throw
  replaceAll('hello, world'); // throw
  replaceAll(); // throw
  replaceAll(null, 'l', 'q'); // throw
  replaceAll('hello, world', null, 'q'); // throw
  replaceAll('hello, world', 'l', null); // throw
*/
```

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