📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 09:36:11
📂
/ (Root)
/
opt
/
alt
/
alt-nodejs22
/
root
/
usr
/
lib
/
node_modules
/
npm
/
node_modules.bundled
/
libnpmversion
/
lib
📍 /opt/alt/alt-nodejs22/root/usr/lib/node_modules/npm/node_modules.bundled/libnpmversion/lib
🔄 Refresh
✏️
Editing: write-json.js
Read Only
// write the json back, preserving the line breaks and indent const { writeFile } = require('node:fs/promises') const kIndent = Symbol.for('indent') const kNewline = Symbol.for('newline') module.exports = async (path, pkg) => { const { [kIndent]: indent = 2, [kNewline]: newline = '\n', } = pkg delete pkg._id const raw = JSON.stringify(pkg, null, indent) + '\n' const data = newline === '\n' ? raw : raw.split('\n').join(newline) return writeFile(path, data) }
💾 Save Changes
❌ Cancel