MCPcopy Create free account
hub / github.com/Hashnode/starter-kit / replace

Function replace

packages/utils/renderer/marked.js:1248–1258  ·  view source on GitHub ↗
(regex, opt)

Source from the content-addressed store, hash-verified

1246 }
1247
1248 function replace(regex, opt) {
1249 regex = regex.source;
1250 opt = opt || '';
1251 return function self(name, val) {
1252 if (!name) return new RegExp(regex, opt);
1253 val = val.source || val;
1254 val = val.replace(/(^|[^\[])\^/g, '$1');
1255 regex = regex.replace(name, val);
1256 return self;
1257 };
1258 }
1259
1260 function noop() {}
1261 noop.exec = noop;

Callers 1

marked.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected