REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.44 KB
Close
/opt/alt/alt-nodejs8/root/lib/node_modules/npm/node_modules/yargs/lib/apply-extends.js
Text
Base64
'use strict' const fs = require('fs') const path = require('path') const YError = require('./yerror') let previouslyVisitedConfigs = [] function checkForCircularExtends (path) { if (previouslyVisitedConfigs.indexOf(path) > -1) { throw new YError(`Circular extended configurations: '${path}'.`) } } function getPathToDefaultConfig (cwd, pathToExtend) { return path.resolve(cwd, pathToExtend) } function applyExtends (config, cwd) { let defaultConfig = {} if (config.hasOwnProperty('extends')) { if (typeof config.extends !== 'string') return defaultConfig const isPath = /\.json$/.test(config.extends) let pathToDefault = null if (!isPath) { try { pathToDefault = require.resolve(config.extends) } catch (err) { // most likely this simply isn't a module. } } else { pathToDefault = getPathToDefaultConfig(cwd, config.extends) } // maybe the module uses key for some other reason, // err on side of caution. if (!pathToDefault && !isPath) return config checkForCircularExtends(pathToDefault) previouslyVisitedConfigs.push(pathToDefault) defaultConfig = isPath ? JSON.parse(fs.readFileSync(pathToDefault, 'utf8')) : require(config.extends) delete config.extends defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault)) } previouslyVisitedConfigs = [] return Object.assign({}, defaultConfig, config) } module.exports = applyExtends
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 9
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
apply-extends.js
1.44 KB
lrw-r--r--
2021-09-28 10:29:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
argsert.js
2.30 KB
lrw-r--r--
2021-09-28 10:29:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
command.js
14.16 KB
lrw-r--r--
2021-09-28 10:29:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
completion.js
3.14 KB
lrw-r--r--
2021-09-28 10:29:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
levenshtein.js
2.12 KB
lrw-r--r--
2021-09-28 10:29:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
obj-filter.js
269 B
lrw-r--r--
2021-09-28 10:29:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
usage.js
14.53 KB
lrw-r--r--
2021-09-28 10:29:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
validation.js
9.84 KB
lrw-r--r--
2021-09-28 10:29:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
yerror.js
254 B
lrw-r--r--
2021-09-28 10:29:33
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).