HEX
Server: LiteSpeed
System: Linux l24.yourwebhosting.net 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: turkishi (1582)
PHP: 8.1.34
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
}