{"name":"json5","version":"2.2.1","description":"JSON for humans.","main":"lib/index.js","module":"dist/index.mjs","bin":{"json5":"lib/cli.js"},"browser":"dist/index.js","types":"lib/index.d.ts","engines":{"node":">=6"},"scripts":{"build":"rollup -c","build-package":"node build/package.js","build-unicode":"node build/unicode.js","coverage":"tap --coverage-report html test","lint":"eslint --fix .","prepublishOnly":"npm run production","preversion":"npm run production","production":"npm run lint && npm test && npm run build","test":"tap -Rspec --100 test","version":"npm run build-package && git add package.json5"},"repository":{"type":"git","url":"git+https://github.com/json5/json5.git"},"keywords":["json","json5","es5","es2015","ecmascript"],"author":{"name":"Aseem Kishore","email":"aseem.kishore@gmail.com"},"contributors":[{"name":"Max Nanasy","email":"max.nanasy@gmail.com"},{"name":"Andrew Eisenberg","email":"andrew@eisenberg.as"},{"name":"Jordan Tucker","email":"jordanbtucker@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/json5/json5/issues"},"homepage":"http://json5.org/","devDependencies":{"core-js":"^2.6.5","eslint":"^5.15.3","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.16.0","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","regenerate":"^1.4.0","rollup":"^0.64.1","rollup-plugin-buble":"^0.19.6","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-node-resolve":"^3.4.0","rollup-plugin-terser":"^1.0.1","sinon":"^6.3.5","tap":"^12.6.0","unicode-10.0.0":"^0.7.5"},"gitHead":"502da86f8e8e2168e301dc5157919935082d0f7b","_id":"json5@2.2.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.3","dist":{"integrity":"sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==","shasum":"655d50ed1e6f95ad1a3caababd2b0efda10b395c","tarball":"https://registry.npmmirror.com/json5/-/json5-2.2.1.tgz","fileCount":20,"unpackedSize":228701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOKiUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrc1A//SuuKE6imiqSY0/zKdRwp5cXeHbu8vi/GaCwNu9m8Ab50PZGT\r\nDlEoFppkYYqa1pJiwFW4OxXYJH8yIeaBFYqu1XeSvlWJrYWvlL5Hnf/e7hS+\r\ndF6YfFgHquMdf+e6wY1jhSaA4qodJauwk7919KTSTDLvtQU0dP7u4HRpKNUZ\r\nSzlzhIP8/PD4BUv4VDTwrzHSxIEd3rKYJgNpChvkkPf/FnK7OWROJNy3n8+q\r\nwxYDAb366euyw4vw0phlWS+5JeHgOZbjIZNeR+ndjfkMZHQZpcUAew231Kw+\r\nPh0xgLHe3rMbV4ioDNtm2WmzFzrQtfFZqNgLySOHcC1jGBiFBCBFy9aAv6uN\r\nGacxM9vcGOGV29XTKhfR4Lxzho93JECRrK0GShSZjD8Q0Kv/QJZSc4lmj1sL\r\nxm0JCbhlo3kW3sbxopPOrMHvSdbZHMTAOWIlAJKrko7YrKtnpuaj3S9WqYRt\r\n31pfXj5RpIRtdvKJv5+fLkEYTWS/zk/efOS0w+G8n0bwZxC4AiSs71P+ya2b\r\ns2K0RxxPD3wyOx8PW1eJkjyxySXQy6MBaKazCCR1uN1Df04sqT04PAwu8U1o\r\noOSzm9W6uOLnVUWnZiv2otkTmZaHwRjidsIV5dteWcR47xVx2E9/54RU1S1Y\r\n4vYHm7wMEwIKo2jjz1vrmxpsMqRGUjt4mFY=\r\n=HXXR\r\n-----END PGP SIGNATURE-----\r\n","size":46539},"_npmUser":{"name":"jordanbtucker","email":"jordanbtucker@gmail.com"},"directories":{},"maintainers":[{"name":"jordanbtucker","email":"jordanbtucker@gmail.com"},{"name":"aseemk","email":"aseem.kishore@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json5_2.2.1_1647880340028_0.4886187859668456"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-21T16:32:28.958Z","readme":"# JSON5 – JSON for Humans\n\n[![Build Status](https://travis-ci.com/json5/json5.svg)][Build Status]\n[![Coverage\nStatus](https://coveralls.io/repos/github/json5/json5/badge.svg)][Coverage\nStatus]\n\nThe JSON5 Data Interchange Format (JSON5) is a superset of [JSON] that aims to\nalleviate some of the limitations of JSON by expanding its syntax to include\nsome productions from [ECMAScript 5.1].\n\nThis JavaScript library is the official reference implementation for JSON5\nparsing and serialization libraries.\n\n[Build Status]: https://travis-ci.com/json5/json5\n\n[Coverage Status]: https://coveralls.io/github/json5/json5\n\n[JSON]: https://tools.ietf.org/html/rfc7159\n\n[ECMAScript 5.1]: https://www.ecma-international.org/ecma-262/5.1/\n\n## Summary of Features\nThe following ECMAScript 5.1 features, which are not supported in JSON, have\nbeen extended to JSON5.\n\n### Objects\n- Object keys may be an ECMAScript 5.1 _[IdentifierName]_.\n- Objects may have a single trailing comma.\n\n### Arrays\n- Arrays may have a single trailing comma.\n\n### Strings\n- Strings may be single quoted.\n- Strings may span multiple lines by escaping new line characters.\n- Strings may include character escapes.\n\n### Numbers\n- Numbers may be hexadecimal.\n- Numbers may have a leading or trailing decimal point.\n- Numbers may be [IEEE 754] positive infinity, negative infinity, and NaN.\n- Numbers may begin with an explicit plus sign.\n\n### Comments\n- Single and multi-line comments are allowed.\n\n### White Space\n- Additional white space characters are allowed.\n\n[IdentifierName]: https://www.ecma-international.org/ecma-262/5.1/#sec-7.6\n\n[IEEE 754]: http://ieeexplore.ieee.org/servlet/opac?punumber=4610933\n\n## Short Example\n```js\n{\n // comments\n unquoted: 'and you can quote me on that',\n singleQuotes: 'I can use \"double quotes\" here',\n lineBreaks: \"Look, Mom! \\\nNo \\\\n's!\",\n hexadecimal: 0xdecaf,\n leadingDecimalPoint: .8675309, andTrailing: 8675309.,\n positiveSign: +1,\n trailingComma: 'in objects', andIn: ['arrays',],\n \"backwardsCompatible\": \"with JSON\",\n}\n```\n\n## Specification\nFor a detailed explanation of the JSON5 format, please read the [official\nspecification](https://json5.github.io/json5-spec/).\n\n## Installation\n### Node.js\n```sh\nnpm install json5\n```\n\n```js\nconst JSON5 = require('json5')\n```\n\n### Browsers\n```html\n\n```\n\nThis will create a global `JSON5` variable.\n\n## API\nThe JSON5 API is compatible with the [JSON API].\n\n[JSON API]:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON\n\n### JSON5.parse()\nParses a JSON5 string, constructing the JavaScript value or object described by\nthe string. An optional reviver function can be provided to perform a\ntransformation on the resulting object before it is returned.\n\n#### Syntax\n JSON5.parse(text[, reviver])\n\n#### Parameters\n- `text`: The string to parse as JSON5.\n- `reviver`: If a function, this prescribes how the value originally produced by\n parsing is transformed, before being returned.\n\n#### Return value\nThe object corresponding to the given JSON5 text.\n\n### JSON5.stringify()\nConverts a JavaScript value to a JSON5 string, optionally replacing values if a\nreplacer function is specified, or optionally including only the specified\nproperties if a replacer array is specified.\n\n#### Syntax\n JSON5.stringify(value[, replacer[, space]])\n JSON5.stringify(value[, options])\n\n#### Parameters\n- `value`: The value to convert to a JSON5 string.\n- `replacer`: A function that alters the behavior of the stringification\n process, or an array of String and Number objects that serve as a whitelist\n for selecting/filtering the properties of the value object to be included in\n the JSON5 string. If this value is null or not provided, all properties of the\n object are included in the resulting JSON5 string.\n- `space`: A String or Number object that's used to insert white space into the\n output JSON5 string for readability purposes. If this is a Number, it\n indicates the number of space characters to use as white space; this number is\n capped at 10 (if it is greater, the value is just 10). Values less than 1\n indicate that no space should be used. If this is a String, the string (or the\n first 10 characters of the string, if it's longer than that) is used as white\n space. If this parameter is not provided (or is null), no white space is used.\n If white space is used, trailing commas will be used in objects and arrays.\n- `options`: An object with the following properties:\n - `replacer`: Same as the `replacer` parameter.\n - `space`: Same as the `space` parameter.\n - `quote`: A String representing the quote character to use when serializing\n strings.\n\n#### Return value\nA JSON5 string representing the value.\n\n### Node.js `require()` JSON5 files\nWhen using Node.js, you can `require()` JSON5 files by adding the following\nstatement.\n\n```js\nrequire('json5/lib/register')\n```\n\nThen you can load a JSON5 file with a Node.js `require()` statement. For\nexample:\n\n```js\nconst config = require('./config.json5')\n```\n\n## CLI\nSince JSON is more widely used than JSON5, this package includes a CLI for\nconverting JSON5 to JSON and for validating the syntax of JSON5 documents.\n\n### Installation\n```sh\nnpm install --global json5\n```\n\n### Usage\n```sh\njson5 [options] \n```\n\nIf `` is not provided, then STDIN is used.\n\n#### Options:\n- `-s`, `--space`: The number of spaces to indent or `t` for tabs\n- `-o`, `--out-file [file]`: Output to the specified file, otherwise STDOUT\n- `-v`, `--validate`: Validate JSON5 but do not output JSON\n- `-V`, `--version`: Output the version number\n- `-h`, `--help`: Output usage information\n\n## Contributing\n### Development\n```sh\ngit clone https://github.com/json5/json5\ncd json5\nnpm install\n```\n\nWhen contributing code, please write relevant tests and run `npm test` and `npm\nrun lint` before submitting pull requests. Please use an editor that supports\n[EditorConfig](http://editorconfig.org/).\n\n### Issues\nTo report bugs or request features regarding the JSON5 data format, please\nsubmit an issue to the [official specification\nrepository](https://github.com/json5/json5-spec).\n\nTo report bugs or request features regarding the JavaScript implementation of\nJSON5, please submit an issue to this repository.\n\n## License\nMIT. See [LICENSE.md](./LICENSE.md) for details.\n\n## Credits\n[Assem Kishore](https://github.com/aseemk) founded this project.\n\n[Michael Bolin](http://bolinfest.com/) independently arrived at and published\nsome of these same ideas with awesome explanations and detail. Recommended\nreading: [Suggested Improvements to JSON](http://bolinfest.com/essays/json.html)\n\n[Douglas Crockford](http://www.crockford.com/) of course designed and built\nJSON, but his state machine diagrams on the [JSON website](http://json.org/), as\ncheesy as it may sound, gave us motivation and confidence that building a new\nparser to implement these ideas was within reach! The original\nimplementation of JSON5 was also modeled directly off of Doug’s open-source\n[json_parse.js] parser. We’re grateful for that clean and well-documented\ncode.\n\n[json_parse.js]:\nhttps://github.com/douglascrockford/JSON-js/blob/03157639c7a7cddd2e9f032537f346f1a87c0f6d/json_parse.js\n\n[Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific\nsupporter, contributing multiple patches and ideas.\n\n[Andrew Eisenberg](https://github.com/aeisenberg) contributed the original\n`stringify` method.\n\n[Jordan Tucker](https://github.com/jordanbtucker) has aligned JSON5 more closely\nwith ES5, wrote the official JSON5 specification, completely rewrote the\ncodebase from the ground up, and is actively maintaining this project.\n"}