PHP 8.2.30
Preview: read-json.js Size: 481 B
/lib/node_modules/npm/node_modules/pacote/lib/util/read-json.js

'use strict'

module.exports = function (content) {
  // Code also yanked from read-package-json.
  function stripBOM (content) {
    content = content.toString()
    // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
    // because the buffer-to-string conversion in `fs.readFileSync()`
    // translates it to FEFF, the UTF-16 BOM.
    if (content.charCodeAt(0) === 0xFEFF) return content.slice(1)
    return content
  }

  return JSON.parse(stripBOM(content))
}

Directory Contents

Dirs: 0 × Files: 7

Name Size Perms Modified Actions
129 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
419 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
8.15 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.21 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.03 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
340 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
481 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).