@tempots/std
Version:
Std library for TypeScript. Natural complement to the Tempo libraries.
2 lines (1 loc) • 420 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=(n,i,u)=>{const s=[];let l=0,e;if(i.global)for(i.lastIndex=0;(e=i.exec(n))!==null;)s.push(n.substring(l,e.index)),s.push(u(...e)),l=e.index+e[0].length;else for(;(e=i.exec(n.substring(l)))!==null;)s.push(n.substring(l,l+e.index)),s.push(u(...e)),l+=e.index+e[0].length;return s.push(n.substring(l)),s.join("")};exports.mapRegExp=g;