Socket
Socket
Sign inDemoInstall

replaceall

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    replaceall

Replace all instances in a JavaScript string


Version published
Weekly downloads
377K
decreased by-1.54%
Maintainers
1
Install size
6.36 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 23 Apr 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc