REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.31 KB
Close
//proc/self/root/opt/alt/alt-nodejs6/root/lib/node_modules/npm/lib/config/find-prefix.js
Text
Base64
// try to find the most reasonable prefix to use module.exports = findPrefix var fs = require('fs') var path = require('path') function findPrefix (p, cb_) { function cb (er, p) { process.nextTick(function () { cb_(er, p) }) } p = path.resolve(p) // if there's no node_modules folder, then // walk up until we hopefully find one. // if none anywhere, then use cwd. var walkedUp = false while (path.basename(p) === 'node_modules') { p = path.dirname(p) walkedUp = true } if (walkedUp) return cb(null, p) findPrefix_(p, p, cb) } function findPrefix_ (p, original, cb) { if (p === '/' || (process.platform === 'win32' && p.match(/^[a-zA-Z]:(\\|\/)?$/))) { return cb(null, original) } fs.readdir(p, function (er, files) { // an error right away is a bad sign. // unless the prefix was simply a non // existent directory. if (er && p === original) { if (er.code === 'ENOENT') return cb(null, original) return cb(er) } // walked up too high or something. if (er) return cb(null, original) if (files.indexOf('node_modules') !== -1 || files.indexOf('package.json') !== -1) { return cb(null, p) } var d = path.dirname(p) if (d === p) return cb(null, original) return findPrefix_(d, original, cb) }) }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 12
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
clear-credentials-by-uri.js
423 B
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
cmd-list.js
1.83 KB
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
core.js
11.03 KB
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
defaults.js
9.98 KB
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
find-prefix.js
1.31 KB
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
get-credentials-by-uri.js
2.06 KB
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
load-cafile.js
682 B
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
load-prefix.js
1.30 KB
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
load-uid.js
386 B
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
nerf-dart.js
471 B
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
set-credentials-by-uri.js
1.24 KB
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
set-user.js
749 B
lrw-r--r--
2021-09-28 09:36:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).