replaceall

0.1.6 • Public • Published

replaceall Build Status npm version devDependency Status

Replace all instances in a JavaScript string.

Install with npm

npm install replaceall

To then include replaceall in your node app:

var replaceall = require("replaceall");

Using replaceall

var result = replaceall("instances of this", "with this string", "in this string");

Example

var original = "hello world goodbye world";
 
replaceall("world", "everyone", original);
// "hello everyone goodbye everyone"
 
replaceall("l", "z", original);
// "hezzo worzd goodbye worzd"

License

MIT License

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.6
    385,785
    • latest

Version History

Package Sidebar

Install

npm i replaceall

Homepage

ilee.co.uk

Weekly Downloads

385,809

Version

0.1.6

License

none

Last publish

Collaborators

  • leecrossley