X7ROOT File Manager
Current Path:
/opt/alt/alt-nodejs24/root/usr/lib/node_modules/npm/lib/utils
opt
/
alt
/
alt-nodejs24
/
root
/
usr
/
lib
/
node_modules
/
npm
/
lib
/
utils
/
??
..
??
audit-error.js
(1.02 KB)
??
auth.js
(3.21 KB)
??
cmd-list.js
(2.88 KB)
??
completion.fish
(1.56 KB)
??
completion.sh
(1.85 KB)
??
did-you-mean.js
(1.12 KB)
??
display.js
(15.38 KB)
??
error-message.js
(14.89 KB)
??
explain-dep.js
(3.03 KB)
??
explain-eresolve.js
(2.56 KB)
??
format-bytes.js
(629 B)
??
format-search-stream.js
(4.78 KB)
??
format.js
(1.91 KB)
??
get-identity.js
(802 B)
??
get-workspaces.js
(1.71 KB)
??
installed-deep.js
(1.1 KB)
??
installed-shallow.js
(583 B)
??
is-windows.js
(177 B)
??
log-file.js
(7.78 KB)
??
npm-usage.js
(2.02 KB)
??
oidc.js
(7.01 KB)
??
open-url.js
(2.36 KB)
??
output-error.js
(767 B)
??
ping.js
(268 B)
??
queryable.js
(9.56 KB)
??
read-user-info.js
(1.91 KB)
??
reify-finish.js
(886 B)
??
reify-output.js
(6.35 KB)
??
sbom-cyclonedx.js
(5.24 KB)
??
sbom-spdx.js
(4.86 KB)
??
tar.js
(3.43 KB)
??
timers.js
(2.07 KB)
??
update-workspaces.js
(1013 B)
??
validate-lockfile.js
(1023 B)
??
verify-signatures.js
(11.58 KB)
Editing: format-bytes.js
// Convert bytes to printable output, for file reporting in tarballs // Only supports up to GB because that's way larger than anything the registry // supports anyways. const formatBytes = (bytes, space = true) => { let spacer = '' if (space) { spacer = ' ' } if (bytes < 1000) { // B return `${bytes}${spacer}B` } if (bytes < 1000000) { // kB return `${(bytes / 1000).toFixed(1)}${spacer}kB` } if (bytes < 1000000000) { // MB return `${(bytes / 1000000).toFixed(1)}${spacer}MB` } // GB return `${(bytes / 1000000000).toFixed(1)}${spacer}GB` } module.exports = formatBytes
Upload File
Create Folder