REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.35 KB
Close
/opt/alt/alt-nodejs19/root/lib/node_modules/npm/node_modules/normalize-package-data/lib/normalize.js
Text
Base64
module.exports = normalize var fixer = require('./fixer') normalize.fixer = fixer var makeWarning = require('./make_warning') var fieldsToFix = ['name', 'version', 'description', 'repository', 'modules', 'scripts', 'files', 'bin', 'man', 'bugs', 'keywords', 'readme', 'homepage', 'license'] var otherThingsToFix = ['dependencies', 'people', 'typos'] var thingsToFix = fieldsToFix.map(function (fieldName) { return ucFirst(fieldName) + 'Field' }) // two ways to do this in CoffeeScript on only one line, sub-70 chars: // thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" // thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) thingsToFix = thingsToFix.concat(otherThingsToFix) function normalize (data, warn, strict) { if (warn === true) { warn = null strict = true } if (!strict) { strict = false } if (!warn || data.private) { warn = function (msg) { /* noop */ } } if (data.scripts && data.scripts.install === 'node-gyp rebuild' && !data.scripts.preinstall) { data.gypfile = true } fixer.warn = function () { warn(makeWarning.apply(null, arguments)) } thingsToFix.forEach(function (thingName) { fixer['fix' + ucFirst(thingName)](data, strict) }) data._id = data.name + '@' + data.version } function ucFirst (string) { return string.charAt(0).toUpperCase() + string.slice(1) }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
extract_description.js
549 B
lrw-r--r--
2023-12-06 18:07:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fixer.js
12.41 KB
lrw-r--r--
2023-12-06 18:07:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
make_warning.js
711 B
lrw-r--r--
2023-12-06 18:07:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
normalize.js
1.35 KB
lrw-r--r--
2023-12-06 18:07:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
safe_format.js
262 B
lrw-r--r--
2023-12-06 18:07:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
typos.json
747 B
lrw-r--r--
2023-12-06 18:07:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
warning_messages.json
1.76 KB
lrw-r--r--
2023-12-06 18:07:51
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).