const u = (e) => ({ clear: function(t = 2) { t === 1 ? Object.keys(e).forEach((c) => { e[c] = void 0; }) : t === 2 ? Object.keys(e).forEach((c) => { delete e[c]; }) : Object.assign(e, {}); }, replace: function(t) { this.clear( 3 /* clear */ ), Object.assign(e, t); } }); function a(e, t, c) { const r = t, l = c || t; return function(n) { const s = [], h = n.matchAll(e); let i = 0; for (const f of h) { const o = n.slice(i, f.index); o && s.push(l(o, !1)), s.push(r(f[0], !0)), i = f.index + f[0].length; } return i < n.length && s.push(l(n.slice(i), !1)), s; }; } export { a as stringTokenizer, u as withRecord }; //# sourceMappingURL=index.es.js.map