PHP 8.2.30
Preview: index.js Size: 367 B
//opt/alt/alt-nodejs12/root/lib/node_modules/npm/node_modules/stringify-package/index.js

'use strict'

module.exports = stringifyPackage

const DEFAULT_INDENT = 2
const CRLF = '\r\n'
const LF = '\n'

function stringifyPackage (data, indent, newline) {
  indent = indent || (indent === 0 ? 0 : DEFAULT_INDENT)
  const json = JSON.stringify(data, null, indent)

  if (newline === CRLF) {
    return json.replace(/\n/g, CRLF) + CRLF
  }

  return json + LF
}

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
516 B lrw-r--r-- 2026-03-09 07:21:35
Edit Download
367 B lrw-r--r-- 2026-03-09 07:21:35
Edit Download
717 B lrw-r--r-- 2026-03-09 07:21:35
Edit Download
1.74 KB lrw-r--r-- 2026-03-09 07:21:35
Edit Download
2.17 KB lrw-r--r-- 2026-03-09 07:21:35
Edit Download

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