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

Function E

benchmark/data-min.js:147–156  ·  view source on GitHub ↗
(l, t)

Source from the content-addressed store, hash-verified

145 return new Array(i + 1).join(' ');
146}
147function E(l, t) {
148 const e = l.split(/[/\\]/),
149 n = t.split(/[/\\]/);
150 for (e.pop(); e[0] === n[0]; ) (e.shift(), n.shift());
151 if (e.length) {
152 let i = e.length;
153 for (; i--; ) e[i] = '..';
154 }
155 return e.concat(n).join('/');
156}
157const R = Object.prototype.toString;
158function x(l) {
159 return R.call(l) === '[object Object]';

Callers 2

generateDecodedMapMethod · 0.85
generateDecodedMapMethod · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected