HEX
Server: LiteSpeed
System: Linux server257.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: salhiscp (12590)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: //opt/alt/alt-nodejs11/root/lib/node_modules/npm/node_modules.bundled/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) {
  const json = JSON.stringify(data, null, indent || DEFAULT_INDENT)

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

  return json + LF
}