Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
alt-nodejs18
/
root
/
lib
/
node_modules
/
npm
/
node_modules
/
libnpmexec
/
lib
/
File Content:
file-exists.js
const { resolve } = require('node:path') const { stat } = require('node:fs/promises') const { walkUp } = require('walk-up-path') const fileExists = async (file) => { try { const res = await stat(file) return res.isFile() } catch { return false } } const localFileExists = async (dir, binName, root) => { for (const path of walkUp(dir)) { const binDir = resolve(path, 'node_modules', '.bin') if (await fileExists(resolve(binDir, binName))) { return binDir } if (path.toLowerCase() === resolve(root).toLowerCase()) { return false } } return false } module.exports = { fileExists, localFileExists, }
Submit
FILE
FOLDER
Name
Size
Permission
Action
file-exists.js
663 bytes
0644
get-bin-from-manifest.js
640 bytes
0644
index.js
9770 bytes
0644
is-windows.js
46 bytes
0644
no-tty.js
44 bytes
0644
run-script.js
1398 bytes
0644
N4ST4R_ID | Naxtarrr