PHP 7.4.33
Preview: utils.js Size: 498 B
/var/www/coop-podio-sms.bitkit.dk/httpdocs/node_modules/jsonfile/utils.js
function stringify (obj, { EOL = '\n', finalEOL = true, replacer = null, spaces } = {}) {
  const EOF = finalEOL ? EOL : ''
  const str = JSON.stringify(obj, replacer, spaces)

  return str.replace(/\n/g, EOL) + EOF
}

function stripBom (content) {
  // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
  if (Buffer.isBuffer(content)) content = content.toString('utf8')
  return content.replace(/^\uFEFF/, '')
}

module.exports = { stringify, stripBom }

Directory Contents

Dirs: 0 × Files: 6
Name Size Perms Modified Actions
8.90 KB lrw-r--r-- 1985-10-26 08:15:00
Edit Download
1.86 KB lrw-r--r-- 1985-10-26 08:15:00
Edit Download
1.08 KB lrw-r--r-- 1985-10-26 08:15:00
Edit Download
1.77 KB lrw-r--r-- 2024-05-28 16:34:56
Edit Download
6.22 KB lrw-r--r-- 1985-10-26 08:15:00
Edit Download
498 B lrw-r--r-- 1985-10-26 08:15:00
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).