UNPKG

cloudworker-proxy

Version:
11 lines (10 loc) 443 B
var replaceall = function (replaceThis, withThis, inThis) { withThis = withThis.replace(/\$/g,"$$$$"); return inThis.replace(new RegExp(replaceThis.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|<>\-\&])/g,"\\$&"),"g"), withThis); }; if (typeof (exports) !== "undefined") { if (typeof (module) !== "undefined" && module.exports) { exports = module.exports = replaceall; } exports.replaceall = replaceall; }