REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 860 B
Close
/opt/alt/alt-nodejs24/root/lib/node_modules/npm/node_modules/@npmcli/package-json/lib/license.js
Text
Base64
// This is an implementation of the validForNewPackage flag in validate-npm-package-license, which is no longer maintained const parse = require('spdx-expression-parse') function usesLicenseRef (ast) { if (Object.hasOwn(ast, 'license')) { return ast.license.startsWith('LicenseRef') || ast.license.startsWith('DocumentRef') } else { return usesLicenseRef(ast.left) || usesLicenseRef(ast.right) } } // license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>" module.exports = function licenseValidForNewPackage (argument) { if (argument === 'UNLICENSED' || argument === 'UNLICENCED') { return true } if (/^SEE LICEN[CS]E IN ./.test(argument)) { return true } try { const ast = parse(argument) return !usesLicenseRef(ast) } catch { return false } }
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
index.js
6.74 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
license.js
860 B
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
normalize-data.js
7.54 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
normalize.js
19.85 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
read-package.js
1.02 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
sort.js
3.50 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
update-dependencies.js
1.98 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
update-scripts.js
664 B
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
update-workspaces.js
626 B
lrw-r--r--
2026-04-24 15:56:03
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).