replaceall
Replace all instances in a JavaScript string
Last updated 12 years ago by leecrossley .
Repository · Bugs · Original npm · Tarball · package.json
$ npm install replaceall 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.6                                ...           latest (12 years ago)

9 Versions

  • 0.1.6                                ...           12 years ago
  • 0.1.5                                ...           12 years ago
  • 0.1.4                                ...           12 years ago
  • 0.1.3                                ...           12 years ago
  • 0.1.2                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           13 years ago
  • 0.0.2                                ...           13 years ago
  • 0.0.1                                ...           13 years ago
Maintainers (1)
Downloads
Total 42
Today 0
This Week 7
This Month 23
Last Day 0
Last Week 0
Last Month 11
Dependencies (0)
None
Dev Dependencies (6)

© 2010 - cnpmjs.org x YWFE | Home | YWFE