This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
admin-panel/graphql-types/node_modules/replaceall
2021-03-09 19:44:13 +01:00
..
.npmignore add configured graphql-codegen 2021-03-09 19:44:13 +01:00
.travis.yml add configured graphql-codegen 2021-03-09 19:44:13 +01:00
Gruntfile.js add configured graphql-codegen 2021-03-09 19:44:13 +01:00
package.json add configured graphql-codegen 2021-03-09 19:44:13 +01:00
README.md add configured graphql-codegen 2021-03-09 19:44:13 +01:00
replaceall.js add configured graphql-codegen 2021-03-09 19:44:13 +01:00
replaceall.min.js add configured graphql-codegen 2021-03-09 19:44:13 +01:00
spec.js add configured graphql-codegen 2021-03-09 19:44:13 +01:00

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