multi-str-replace

1.0.2 • Public • Published

multi-str-replace

A very simple way to replace one or multiple strings values in one call.

Installation

npm install multi-str-replace

Use example - Multi (Array of string)

const replace = require('multi-str-replace');

texto = "All vowels letters can be changed to the X letter in same time"

let new_texto = replace(texto,["a","e","i","o","u"],"X");

Use example - Traditional (Simple string)

const replace = require('multi-str-replace');

texto = "All ocurrences of 'e' letter can be changed to the X letter"

let new_texto = replace(texto,"e","X");

Work for future versions:

Suggest on github

Package Sidebar

Install

npm i multi-str-replace

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

1.52 kB

Total Files

3

Last publish

Collaborators

  • wilsonfilho