'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 }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
CHANGELOG.md | File | 516 B | 0644 |
|
LICENSE | File | 717 B | 0644 |
|
README.md | File | 2.17 KB | 0644 |
|
index.js | File | 367 B | 0644 |
|
package.json | File | 4.1 KB | 0644 |
|