$64 GRAYBYTE WORDPRESS FILE MANAGER $37

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/alt-nodejs16/root/usr/lib/node_modules/npm/lib/utils/

HOME
Current File : /opt/alt/alt-nodejs16/root/usr/lib/node_modules/npm/lib/utils//did-you-mean.js
const { distance } = require('fastest-levenshtein')
const readJson = require('read-package-json-fast')
const { commands } = require('./cmd-list.js')

const didYouMean = async (npm, path, scmd) => {
  // const cmd = await npm.cmd(str)
  const close = commands.filter(cmd => distance(scmd, cmd) < scmd.length * 0.4 && scmd !== cmd)
  let best = []
  for (const str of close) {
    const cmd = await npm.cmd(str)
    best.push(`    npm ${str} # ${cmd.description}`)
  }
  // We would already be suggesting this in `npm x` so omit them here
  const runScripts = ['stop', 'start', 'test', 'restart']
  try {
    const { bin, scripts } = await readJson(`${path}/package.json`)
    best = best.concat(
      Object.keys(scripts || {})
        .filter(cmd => distance(scmd, cmd) < scmd.length * 0.4 && !runScripts.includes(cmd))
        .map(str => `    npm run ${str} # run the "${str}" package script`),
      Object.keys(bin || {})
        .filter(cmd => distance(scmd, cmd) < scmd.length * 0.4)
        /* eslint-disable-next-line max-len */
        .map(str => `    npm exec ${str} # run the "${str}" command from either this or a remote npm package`)
    )
  } catch (_) {
    // gracefully ignore not being in a folder w/ a package.json
  }

  if (best.length === 0) {
    return ''
  }

  const suggestion =
    best.length === 1
      ? `\n\nDid you mean this?\n${best[0]}`
      : `\n\nDid you mean one of these?\n${best.slice(0, 3).join('\n')}`
  return suggestion
}
module.exports = didYouMean


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
19 Mar 2026 8.38 AM
root / root
0755
completion
--
19 Mar 2026 8.38 AM
root / root
0755
config
--
19 Mar 2026 8.38 AM
root / root
0755
ansi-trim.js
0.169 KB
9 Mar 2026 6.51 AM
root / root
0644
audit-error.js
0.955 KB
9 Mar 2026 6.51 AM
root / root
0644
cmd-list.js
2.46 KB
9 Mar 2026 6.51 AM
root / root
0644
completion.sh
1.854 KB
9 Mar 2026 6.51 AM
root / root
0755
did-you-mean.js
1.463 KB
9 Mar 2026 6.51 AM
root / root
0644
display.js
2.84 KB
9 Mar 2026 6.51 AM
root / root
0644
error-message.js
12.642 KB
9 Mar 2026 6.51 AM
root / root
0644
exit-handler.js
6.767 KB
9 Mar 2026 6.51 AM
root / root
0644
explain-dep.js
3.733 KB
9 Mar 2026 6.51 AM
root / root
0644
explain-eresolve.js
2.557 KB
9 Mar 2026 6.51 AM
root / root
0644
format-bytes.js
0.614 KB
9 Mar 2026 6.51 AM
root / root
0644
format-search-stream.js
3.929 KB
9 Mar 2026 6.51 AM
root / root
0644
get-identity.js
0.723 KB
9 Mar 2026 6.51 AM
root / root
0644
is-windows.js
0.228 KB
9 Mar 2026 6.51 AM
root / root
0644
log-file.js
7.644 KB
9 Mar 2026 6.51 AM
root / root
0644
log-shim.js
1.678 KB
9 Mar 2026 6.51 AM
root / root
0644
npm-usage.js
1.952 KB
9 Mar 2026 6.51 AM
root / root
0644
open-url-prompt.js
1.539 KB
9 Mar 2026 6.51 AM
root / root
0644
open-url.js
1.174 KB
9 Mar 2026 6.51 AM
root / root
0644
otplease.js
1.231 KB
9 Mar 2026 6.51 AM
root / root
0644
ping.js
0.246 KB
9 Mar 2026 6.51 AM
root / root
0644
pulse-till-done.js
0.402 KB
9 Mar 2026 6.51 AM
root / root
0644
queryable.js
9.577 KB
9 Mar 2026 6.51 AM
root / root
0644
read-user-info.js
1.989 KB
9 Mar 2026 6.51 AM
root / root
0644
reify-finish.js
0.855 KB
9 Mar 2026 6.51 AM
root / root
0644
reify-output.js
4.962 KB
9 Mar 2026 6.51 AM
root / root
0644
replace-info.js
0.788 KB
9 Mar 2026 6.51 AM
root / root
0644
tar.js
3.729 KB
9 Mar 2026 6.51 AM
root / root
0644
timers.js
3.181 KB
9 Mar 2026 6.51 AM
root / root
0644
update-notifier.js
4.452 KB
9 Mar 2026 6.51 AM
root / root
0644
validate-lockfile.js
0.999 KB
9 Mar 2026 6.51 AM
root / root
0644
web-auth.js
0.545 KB
9 Mar 2026 6.51 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF