░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/usr/lib/node_modules/npm/node_modules/@npmcli/package-json/lib
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: update-scripts.js
const updateScripts = ({ content, originalContent = {} }) => { const newScripts = content.scripts if (!newScripts) { return originalContent } // validate scripts content being appended const hasInvalidScripts = () => Object.entries(newScripts) .some(([key, value]) => typeof key !== 'string' || typeof value !== 'string') if (hasInvalidScripts()) { throw Object.assign( new TypeError( 'package.json scripts should be a key-value pair of strings.'), { code: 'ESCRIPTSINVALID' } ) } return { ...originalContent, scripts: { ...newScripts, }, } } module.exports = updateScripts
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 index.js
JS
6.2 KB
2023-09-24 03:45
EDIT
📄 normalize.js
JS
18.3 KB
2023-09-24 03:45
EDIT
📄 update-dependencies.js
JS
2 KB
2023-09-24 03:45
EDIT
📄 update-scripts.js
JS
664 B
2023-09-24 03:45
EDIT
📄 update-workspaces.js
JS
626 B
2023-09-24 03:45
EDIT