$65 GRAYBYTE WORDPRESS FILE MANAGER $53

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cpanel/ea-nodejs22/lib/node_modules/npm/node_modules/@npmcli/package-json/lib/

HOME
Current File : /opt/cpanel/ea-nodejs22/lib/node_modules/npm/node_modules/@npmcli/package-json/lib//read-package.js
// This is JUST the code needed to open a package.json file and parse it.
// It's isolated out so that code needing to parse a package.json file can do so in the same way as this module does, without needing to require the whole module, or needing to require the underlying parsing library.

const { readFile } = require('fs/promises')
const parseJSON = require('json-parse-even-better-errors')

async function read (filename) {
  try {
    const data = await readFile(filename, 'utf8')
    return data
  } catch (err) {
    err.message = `Could not read package.json: ${err}`
    throw err
  }
}

function parse (data) {
  try {
    const content = parseJSON(data)
    return content
  } catch (err) {
    err.message = `Invalid package.json: ${err}`
    throw err
  }
}

// This is what most external libs will use.
// PackageJson will call read and parse separately
async function readPackage (filename) {
  const data = await read(filename)
  const content = parse(data)
  return content
}

module.exports = {
  read,
  parse,
  readPackage,
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
1 Jan 1970 8.00 AM
root / root
0
index.js
6.346 KB
17 Jan 2026 1.16 AM
root / root
0644
normalize-data.js
7.8 KB
17 Jan 2026 1.16 AM
root / root
0644
normalize.js
19.218 KB
17 Jan 2026 1.16 AM
root / root
0644
read-package.js
1.023 KB
17 Jan 2026 1.16 AM
root / root
0644
sort.js
3.505 KB
17 Jan 2026 1.16 AM
root / root
0644
update-dependencies.js
1.979 KB
17 Jan 2026 1.16 AM
root / root
0644
update-scripts.js
0.648 KB
17 Jan 2026 1.16 AM
root / root
0644
update-workspaces.js
0.611 KB
17 Jan 2026 1.16 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF