ACIL FM
Dark
Refresh
Current DIR:
/lib/node_modules/npm/node_modules/@npmcli/package-json/lib
/
lib
node_modules
npm
node_modules
@npmcli
package-json
lib
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
index.js
2.69 MB
chmod
View
DL
Edit
Rename
Delete
update-dependencies.js
1.98 MB
chmod
View
DL
Edit
Rename
Delete
update-scripts.js
664 B
chmod
View
DL
Edit
Rename
Delete
update-workspaces.js
626 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /lib/node_modules/npm/node_modules/@npmcli/package-json/lib/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
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply