MCPcopy Index your code
hub / github.com/socketstream/socketstream / replace

Function replace

docs/js/marked.js:987–997  ·  view source on GitHub ↗
(regex, opt)

Source from the content-addressed store, hash-verified

985}
986
987function replace(regex, opt) {
988 regex = regex.source;
989 opt = opt || '';
990 return function self(name, val) {
991 if (!name) return new RegExp(regex, opt);
992 val = val.source || val;
993 val = val.replace(/(^|[^\[])\^/g, '$1');
994 regex = regex.replace(name, val);
995 return self;
996 };
997}
998
999function noop() {}
1000noop.exec = noop;

Callers 1

marked.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected