areplace

1.0.5 • Public • Published

Similar to string.replace, except "search" is an array, and "replace" can be an array or a string.

Example:

var str = 'This fuzzy chipmunk can fly'; str = str.areplace(['fuzzy', 'fly'], ['happy', 'run'], 'gi');

The new string would read 'This happy chipmunk can run'.

The 'gi' is for global replacement, and case insensitive.

Package Sidebar

Install

npm i areplace

Weekly Downloads

0

Version

1.0.5

License

GPL-3.0

Unpacked Size

37.8 kB

Total Files

4

Last publish

Collaborators

  • schlandower