🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

bundl-replace

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bundl-replace

Replace strings within your bundles

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

bundl-replace

Replace strings within your bundles

Runs with the amazing Bundl build tool

Install

$ npm install --save-dev bundl-replace

Use

var Bundl = require('bundl');
var write = require('bundl-write');
var replace = require('bundl-replace');

new Bundl(targets)
    .then(replace(pattern, replacement))
    .then(write())
    .go();

Arguments

Behave like String.prototype.replace with the exception that String patterns are replaced globally

Direct Replace

Sometimes it is desirable to do a direct string replace without converting to a RegEx. Note: this only replaces the first occurrence.

var Bundl = require('bundl');
var write = require('bundl-write');
var replace = require('bundl-replace');

new Bundl(targets)
    .then(replace.direct('(function(foo){', '(function(bar){'))
    .then(write())
    .go();

FAQs

Package last updated on 17 May 2018

Did you know?

Socket

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