{"name":"jsonc","version":"2.0.0","description":"Everything you need in JSON land. Parse JSON with comments, stringify objects with circular references, etc...","author":{"name":"Onur Yıldırım","email":"onur@cutepilot.com"},"license":"MIT","homepage":"https://onury.io/jsonc","repository":{"type":"git","url":"git+https://github.com/onury/jsonc.git"},"main":"index.js","types":"./lib/jsonc.d.ts","engines":{"node":">=8"},"scripts":{"clean":"rimraf ./lib","build":"npm run clean && npm run cover && mkdirp ./lib && tsc","test":"jest --verbose --no-cache","cover":"jest --coverage --verbose --no-cache","coveralls":"cat ./test/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js -v","report":"open ./test/coverage/lcov-report/index.html","docs":"docma -c ./docma.json"},"jest":{"testEnvironment":"node","globals":{"ts-jest":{"diagnostics":false}},"roots":["<rootDir>/src","<rootDir>/lib","<rootDir>/test"],"transform":{"^.+\\.tsx?$":"ts-jest"},"testRegex":"(/test/.*|(\\.|/)(test|spec))\\.tsx?$","moduleFileExtensions":["ts","tsx","js","json"],"testPathIgnorePatterns":["/backup/","/helpers/","/coverage/"],"collectCoverageFrom":["src/**/*.ts","!src/interfaces.ts"],"coverageDirectory":"./test/coverage"},"keywords":["json","object","notation","safe","stringify","parse","read-file","write-file","comments","circular","cyclic","console","log","uglify","beautify","typescript"],"dependencies":{"fast-safe-stringify":"^2.0.6","graceful-fs":"^4.1.15","mkdirp":"^0.5.1","parse-json":"^4.0.0","strip-bom":"^4.0.0","strip-json-comments":"^3.0.1"},"devDependencies":{"@types/jest":"^24.0.15","@types/mkdirp":"^0.5.2","@types/node":"^12.0.8","@types/parse-json":"^4.0.0","@types/strip-bom":"^4.0.1","@types/strip-json-comments":"0.0.30","coveralls":"^3.0.4","docma":"^3.2.2","jest":"^24.8.0","jest-cli":"^24.8.0","rimraf":"^2.6.3","ts-jest":"^24.0.2","typescript":"^3.5.2"},"gitHead":"e72b205dbbc145635bd13cef29b253d453610e98","bugs":{"url":"https://github.com/onury/jsonc/issues"},"_id":"jsonc@2.0.0","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-B281bLCT2TRMQa+AQUQY5AGcqSOXBOKaYGP4wDzoA/+QswUfN8sODektbPEs9Baq7LGKun5jQbNFpzwGuVYKhw==","shasum":"9e2a25100d164a9bb864c57517563717fa882551","tarball":"http://registry-npm.ywwl.com/jsonc/download/jsonc-2.0.0.tgz","fileCount":12,"unpackedSize":90228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBu4DCRA9TVsSAnZWagAAIeUQAJXGuMwrlpfFJw0jUWSk\noPbjXHL3IgWCEt9z6k2HtXNkWJRRNpO0mehwxxgOW9RVYRWvQ94M2NQkNzYo\n+8zeCgOUJskb+dYch1Pu7iIqorbw5MGQr1B6CQfF1mlVhQybUs1i08m4Nu+e\nAcshUDjPKa38pIWUUyl3nnpsPkEHqrsTgdKGROa1FmtD3hZ7HrLbfGW1113H\nvg1YoFblW4RKkbESTMNz5PU/6Q4prW0uAQwnW0QLO8JC/y/i4ZN9LLEkpQhg\nGwj91T9/a7kwpGgSqHiVw6so3kuj3HvVNoyK6khqu3htQ1y4Wy6n+GWE7co5\nQq1/VPgqWnfr3FYUuiPO9hAyZq8RqlOb397WYYtOlsj3c9tYrDkOo/SF0Tgc\nqqvJOa+1nLeLxA9cO+58Gu51Kcti+E7YNbUUdUKOV4/Pybkk5e2AuC0CV/XB\nA6qr9st7T4gTpxXV5RTf9a5tODBQ9gJzgyaI56cnN29GJPgjgSgLvXRB6rSq\n7u/T+af8L9csxSE1L7XVTx8Dz4Cw7uTv8+bWyGTtMLoX2ht1vy94NPuOx0p4\nimkgD54QQI7XCYBrtqhF9Avnkp+WXC1kGBjL2SZoq+GY4VM7qOke0/Okohq9\nifsWkHpxU3JAJjY1wU2Nm6RvQB2+YKMCfJ0aGWv97arHDnvoafDCqSS/tj/u\nDSFf\r\n=vtcO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSS3bVifxpD9Cix5fMtsitDpQWN3vROBtcQXVbKI5HHgIhALETCCNzc4bANTkesnuTzMQVUPjQuHazZgnMERT09I/c"}],"size":12880,"noattachment":false,"key":"/jsonc/-/jsonc-2.0.0.tgz"},"maintainers":[{"email":"onur@cutepilot.com","name":"onury"}],"_npmUser":{"name":"onury","email":"onur@cutepilot.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jsonc_2.0.0_1560735234752_0.6878964936217269"},"_hasShrinkwrap":false,"readme":"# jsonc\n\n[![build-status](https://img.shields.io/travis/onury/jsonc.svg?branch=master&style=flat-square)](https://travis-ci.org/onury/jsonc)\n[![coverage-status](https://img.shields.io/coveralls/github/onury/jsonc/master.svg?style=flat-square)](https://coveralls.io/github/onury/jsonc?branch=master)\n[![npm](http://img.shields.io/npm/v/jsonc.svg?style=flat-square)](https://www.npmjs.com/package/jsonc)\n[![release](https://img.shields.io/github/release/onury/jsonc.svg?style=flat-square)](https://github.com/onury/jsonc)\n[![dependencies](https://david-dm.org/onury/jsonc.svg?style=flat-square)](https://david-dm.org/onury/jsonc)\n[![license](http://img.shields.io/npm/l/jsonc.svg?style=flat-square)](https://github.com/onury/jsonc/blob/master/LICENSE)\n[![maintained](https://img.shields.io/maintenance/yes/2019.svg?style=flat-square)](https://github.com/onury/jsonc/graphs/punch-card)  \n\n> © 2019, Onur Yıldırım ([@onury](https://github.com/onury)). MIT License.\n\nEverything you need in JSON land.\n\n`npm i jsonc`\n\n## Features\n\n- Parse JSON with comments.\n- Stringify objects with circular references.\n- Safely parse / stringify without try/catch blocks.\n- Read and auto-parse JSON files gracefully, sync or async (with promises).\n- Auto-stringify and write JSON files gracefully, sync or async (with promises).\n- Strips UTF-8 BOM.\n- Log objects as JSON (without worrying about errors).\n- Uglify/beautify JSON strings.\n- More helpful JSON errors.\n- Friendly API.\n- TypeScript support.\n\n## Usage\n\nSee the concise [API reference][docs-api].\n\n```js\nconst jsonc = require('jsonc');\n// or\nimport { jsonc } from 'jsonc';\n```\n\nThis is safe for JSON with comments:\n```js\njsonc.parse('// comment\\n{\"data\": /* comment */ \"value\"}\\n'); // » { data: 'value' }\n```\n\nAnd this is safe for circular references:\n```js\nconst obj = { x: 1 };\nobj.y = obj; // circular\njsonc.stringify(obj); // » { x: 1, y: '[Circular]' }\n```\n\nBut this is seriously safe:\n```js\n// safe version of every method\nconst jsonc = require('jsonc').safe;\n// or\nimport { safe as jsonc } from 'jsonc';\n\nconst [err, result] = jsonc.parse('[invalid JSON}');\nif (err) {\n    console.log(`Failed to parse JSON: ${err.message}`);\n} else {\n    console.log(result);\n}\n```\n\n## Documentation\n\nSee the concise [API reference][docs-api].\n\n## Change Log\n\n- **v2.0.0** (2019-06-17)\n    + Requires Node.js v8 or newer.\n    + Updated dependencies.\n\n\n- **v1.1.0** (2018-11-22)\n    + Fixed an issue where TypeScript compiler would complain about `'declare' modifier`.\n    + Improved typings for safe methods.\n    + Updated core dependencies.\n\n\n- **v1.0.0** (2018-10-18)\n    + Initial release.\n\n\n## License\nMIT.\n\n\n[docs-api]:https://onury.io/jsonc/api\n[strip-json-comments]:https://github.com/sindresorhus/strip-json-comments\n[json-stringify-safe]:https://github.com/isaacs/json-stringify-safe\n[parse-json]:https://github.com/sindresorhus/parse-json\n[fs-extra]:https://www.npmjs.com/package/fs-extra\n","publish_time":1560735234836,"_cnpm_publish_time":1560735234836,"dist-tags":{"latest":"3.0.0"}}