/usr/local/lib/node_modules/npm/node_modules/tar/dist/esm
NameSizeModeActions
create.js21630644editdlrm
cwd-error.js3100644editdlrm
extract.js16920644editdlrm
get-write-flag.js10180644editdlrm
header.js110960644editdlrm
index.js6470644editdlrm
index.min.js829670644editdlrm
large-numbers.js25810644editdlrm
list.js34440644editdlrm
make-command.js18700644editdlrm
mkdir.js57390644editdlrm
mode-fix.js7530644editdlrm
normalize-unicode.js10090644editdlrm
normalize-windows-path.js4900644editdlrm
options.js16390644editdlrm
pack.js144020644editdlrm
package.json230644editdlrm
parse.js227980644editdlrm
path-reservations.js54470644editdlrm
pax.js47540644editdlrm
process-umask.js1560644editdlrm
read-entry.js41750644editdlrm
replace.js72050644editdlrm
strip-absolute-path.js10600644editdlrm
strip-trailing-slashes.js4890644editdlrm
symlink-error.js3900644editdlrm
types.js12770644editdlrm
unpack.js336090644editdlrm
update.js10060644editdlrm
warn-method.js7950644editdlrm
winchars.js5490644editdlrm
write-entry.js227810644editdlrm
Edit: /usr/local/lib/node_modules/npm/node_modules/tar/dist/esm/normalize-unicode.js (1009B)
// warning: extremely hot code path. // This has been meticulously optimized for use // within npm install on large package trees. // Do not edit without careful benchmarking. const normalizeCache = Object.create(null); // Limit the size of this. Very low-sophistication LRU cache const MAX = 10000; const cache = new Set(); export const normalizeUnicode = (s) => { if (!cache.has(s)) { // shake out identical accents and ligatures normalizeCache[s] = s .normalize('NFD') .toLocaleLowerCase('en') .toLocaleUpperCase('en'); } else { cache.delete(s); } cache.add(s); const ret = normalizeCache[s]; let i = cache.size - MAX; // only prune when we're 10% over the max if (i > MAX / 10) { for (const s of cache) { cache.delete(s); delete normalizeCache[s]; if (--i <= 0) break; } } return ret; }; //# sourceMappingURL=normalize-unicode.js.map