UNPKG

string-replace-all

Version:

Replaces all the occurrences of a string into a string with another string.

26 lines (15 loc) 491 B
# stringReplaceAll Replaces all the occurrences of a string into a string with another string. ## Install ```shell $ npm install --save string-replace-all ``` ## Usage ```js import stringReplaceAll from 'string-replace-all'; stringReplaceAll ( 'A tiny tiny tiger', 'tiny', 'small' ); // 'A small small tiger' ``` ## Related - [string-matches](https://github.com/fabiospampinato/string-matches) - Retrieves all the matches of a regex in a string. ## License MIT © Fabio Spampinato