MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / C

Function C

benchmark/data-min.js:161–177  ·  view source on GitHub ↗
(l)

Source from the content-addressed store, hash-verified

159 return R.call(l) === '[object Object]';
160}
161function C(l) {
162 const t = l.split(`
163`),
164 e = [];
165 for (let n = 0, i = 0; n < t.length; n++) (e.push(i), (i += t[n].length + 1));
166 return function (i) {
167 let r = 0,
168 s = e.length;
169 for (; r < s; ) {
170 const a = (r + s) >> 1;
171 i < e[a] ? (s = a) : (r = a + 1);
172 }
173 const h = r - 1,
174 o = i - e[h];
175 return { line: h, column: o };
176 };
177}
178class y {
179 constructor(t) {
180 ((this.hires = t),

Callers 3

generateDecodedMapMethod · 0.85
_splitChunkMethod · 0.85
generateDecodedMapMethod · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected