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/replaceall.js

11 lines
443 B
JavaScript

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;
}