{"_id":"@ahwayakchih/logify","_rev":"4-6ef5b31c16f9688482ae7bae89beb1e8","name":"@ahwayakchih/logify","dist-tags":{"latest":"2.0.0"},"versions":{"1.1.0":{"name":"@ahwayakchih/logify","version":"1.1.0","description":"Turn objects/values into JSON string safely, keep result easy on the eyes","main":"index.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap-diff":"^0.1.1","tape":"^4.11.0","tape-catch":"^1.0.6"},"scripts":{"test":"node test/index.js | tap-diff"},"keywords":["JSON","stringify","circular","reference"],"author":{"name":"Marcin Konicki","url":"https://ahwayakchih.neoni.net"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/ahwayakchih/logify.git"},"bugs":{"url":"https://github.com/ahwayakchih/logify/issues"},"homepage":"https://github.com/ahwayakchih/logify#readme","gitHead":"77e181b3e530a6e09f4e60d5de1f2d762b1a318e","_id":"@ahwayakchih/logify@1.1.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-IjEK+kLhIUVQUhnqdkssBA+FKRlhu/bbwrAUGsEt7tiXXjQP1hY7tBqLooCMVoIvooB4CdwVs7VvXzIJHk83ig==","shasum":"833d5ae6c27988ef3e5f26082f3ad0c976ad87d9","tarball":"https://registry.npmjs.org/@ahwayakchih/logify/-/logify-1.1.0.tgz","fileCount":5,"unpackedSize":6935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdd6s8CRA9TVsSAnZWagAABYQP/iQyIJzGvWBBbTFEdqmI\ndxYFTOIAUvMZohZo876xKyWdoQzzebAOBWDrgfgz1mllRuwKJdRFOINe9vq1\ncrKu9bOTGMzXtoPBg9RMhO27CjwnvII2EsUGwYiQ1SSKnZYvHtyjbx4zKPhe\nyC4pA0LnY6ofHYZWR1c3NbmQfYeFgRbqQylHytYTDRky+1WQ1H5HQSUtjXG4\nNlrYbLDgiYAG2Cc9DkXkruWx/f8LOzYo0y1FU4d4JBWzqGAQObEY3XjczIX1\ngs+FSmIBB0Uyl8CiPLp4YgZPqD9xt4QFGPARo7qdl7Y5fxtAKwUirYDAL0Gz\nJXlgOfXmw62tjiBGUGJkSZekIrVdH6FDL2mHweX9c4HLDVB+pVtMNDbt/Xb4\nrpuGAEWCHWIVqu3MUmNRsiYlPOyRVGU18UE6xp5cEhvSnGOslBVC7qYpv0j4\ndIHAIaqF4SwQ65nSiR0/fxv3J5ADqrQcnl1TpNuDJwoxVH6KG0P+g2JIs0HZ\nuTE7OHsB8dJf2TZwdrjC9EDKTQPadDvZdNwCcyVc2/VgZmzL4FYINPgOHoWh\n8U39bDxwb3vmMu5F+tSew/0/MlHCSLnLY193Ucu0p7+FLyc913P2fEP+5MLZ\nOkcjnFyN2GMbVwqGrK2qSYW3uX/jkwpOsmnIGFSWij5Vt7lLMl5CstFLZgv5\nAZuR\r\n=BU7Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDOLl5OGCXxeqppbOTC8X/gOrkx3SYO93lwedPRaM2VqAiEArBVOOa3Tw9BDg8VrY7DidS6RjL1rG+Z/WP41MrpDryM="}]},"maintainers":[{"name":"ahwayakchih","email":"ahwayakchih@neoni.net"}],"_npmUser":{"name":"ahwayakchih","email":"ahwayakchih@neoni.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/logify_1.1.0_1568123707548_0.6480403718997061"},"_hasShrinkwrap":false},"1.1.1":{"name":"@ahwayakchih/logify","version":"1.1.1","description":"Turn objects/values into JSON string safely, keep result easy on the eyes","main":"index.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap-diff":"^0.1.1","tape":"^4.11.0","tape-catch":"^1.0.6"},"scripts":{"test":"node test/index.js | tap-diff","publish":"npm publish --access public"},"keywords":["JSON","stringify","circular","reference"],"author":{"name":"Marcin Konicki","url":"https://ahwayakchih.neoni.net"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/ahwayakchih/logify.git"},"bugs":{"url":"https://github.com/ahwayakchih/logify/issues"},"homepage":"https://github.com/ahwayakchih/logify#readme","gitHead":"ea574bc875642c5e79fc0b01fd493b9625e7055b","_id":"@ahwayakchih/logify@1.1.1","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-6kD292MHnqJVbdUUDaCcZv8lmSyRUsE1R6p8ejrJZGIuAU9eY4lk2YKuQl95Nih4MCdiwz9Tt2uZaeGA6HGn0A==","shasum":"cbf2c5570631457edbc2e0335a6bf2bfdf9c3121","tarball":"https://registry.npmjs.org/@ahwayakchih/logify/-/logify-1.1.1.tgz","fileCount":5,"unpackedSize":6994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdd6xnCRA9TVsSAnZWagAA9IYP/jw2bnjfBz6DP8qe/Fip\ndbcmr68ur9JPbWpwAOEWYoW67+WS0jGretd/cArq1kewdBpfhjIh2qKLjSQj\nn4XsTjByYGcaQpRf/g3E+P3GN5dhWbpqW2SlWBWRzMY3J6Nt/pFbvS+vTAnn\n/gVrQMhGJvzy/1LSdtr7deBEn3sUEzy1zbGbwYk5nzlN9g3tv7yKJ9gpSRDP\nHRsu0NoNTHjSwXQd8nNt5hfKkorUsGjgjABfPDpxFH8j3FuYTAha2OcXT31L\nL00yMX07uXyVUhIaYzfvPey6FxI80a3bgTrOk0NJURJeDtVb7CkTCCS6CUTn\nkNTi0JZiDddfDJA7Qg4un/tOAri4bgwnrfIlInPZoS5gAIdx7EJ8nKF6PGzc\nP6Xfeggo6NPNCH2O7M86vpuBTvHqwXBVLZNXBvAk/k5Wh3bxmcuQRM046rw5\nvWkALS5ADCFVDvLO2FetY44tP6o+08Cxfq2q6I23VSBDQDg/uFxxRS/ZKbs9\nt+aDggl6gURyCB6FVUwnZaeOAjMrXDMxHA1TCDh1TQuu82G2QtKGeyRUWV3Q\nsa3bRTKthLfdHGAv6HU6aXO8oxRETKYNyhy2Eu1EshQqAfi05Zj1UNvJSAdy\noy7H08D8/y3nfaTArDzBfn94J4cgbdcBaKy1ofRvKef92z8ItBpJSA0sqPJf\nT6Fg\r\n=igGr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGQgHl+G5Oyx1X/5CYx//ykjAmWJ3iHqGPu0bvYB2OxuAiB7yRjdcX2pIxIcpS+zT+E/WTq5Neqn0GV1RxTuQkz4Ig=="}]},"maintainers":[{"name":"ahwayakchih","email":"ahwayakchih@neoni.net"}],"_npmUser":{"name":"ahwayakchih","email":"ahwayakchih@neoni.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/logify_1.1.1_1568124006998_0.5975834313834394"},"_hasShrinkwrap":false},"1.2.0":{"name":"@ahwayakchih/logify","version":"1.2.0","description":"Turn objects/values into JSON string safely, keep result easy on the eyes","main":"index.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap-diff":"^0.1.1","tape":"^4.11.0","tape-catch":"^1.0.6"},"scripts":{"test":"node test/index.js | tap-diff","publish":"npm publish --access public"},"keywords":["JSON","stringify","circular","reference"],"author":{"name":"Marcin Konicki","url":"https://ahwayakchih.neoni.net"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/ahwayakchih/logify.git"},"bugs":{"url":"https://github.com/ahwayakchih/logify/issues"},"homepage":"https://github.com/ahwayakchih/logify#readme","gitHead":"66774d4c0ba715e60f0e1edfae938141c8604d96","_id":"@ahwayakchih/logify@1.2.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-c0NA5tsBYB4EBXZImHFQ6Tx2q6CKHnagMhR143MrpxncxKqBEy8YFbdywlxSL/1k38fOnrUKytL8GJeKLK5o4Q==","shasum":"d0cc7619efbaf3ddb7113370b389c2e6b2a0bd1e","tarball":"https://registry.npmjs.org/@ahwayakchih/logify/-/logify-1.2.0.tgz","fileCount":5,"unpackedSize":7907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJded77CRA9TVsSAnZWagAASPsP/iCGVlY5H2ECafWOfTky\nnPtsSv+Gf/4yWp9m9+WIKI4GMn+d/hGPpoYYcr+opUOKJKOPsIceXgdqBEyG\nYZGHzLMBLcTdioTX7bzNvh3hsBPzgutFAuFTAvhA5W4+9v2QpgWkV3mnIxh+\nqKNrSf5WWcyrZGh+Bsy8+vh5l3SGJVine/l4fwsyjqyNNn7ur+13NFZ3x2G0\n4RCY6xBWRR3QdsPR8Vp74E2UEHa0r1j4EzJrQq0fPozuCk8pReuVhtrkTTpo\nMmWRI09WNVAausrmWIQSp+S84BIafANx3zKDT8ijTDXRtHp0ROjnyvlc96TA\nI1FxqdaGFgO1uQCH4mTWwRq+3pNv71NauxnfokaiX8IQaSIGiWAe4kvyuu+w\nzDx3qPaWLJOFTH4m5uuen3k5hLhxsgINWU1AE6lixywStCFTD+CSGrSU4CLg\nacqWc01yn+gKPLmW8YzzKJbcW8ClTCRX+1WGlZS6vcaL5CsBKnxgQ7rGqzch\niqIKARuGrOlCLLMjwKnNt88GnD8vCrP1vziElbfk9W3pQHHm3TpP6wxlv0kW\nePZrL0rhVx2kXkdXaFpMOgh//xVVNLxzxyzeg6PXaf3S96zAq7sIyioaGdNd\n9eAIk6Aay1pVRcDl2v0HIehmwMF+E8hnVNOn2VWFklU+Q/7n3Vw34KPvGa/5\nAPVN\r\n=Kznr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzWz3Xv5xYszpOwhAMQVGuyzALYfKVh7fgwHWAX9/RtQIhAOSnazI8oDsdMpICRP6kcv6odJibz8jNrIuAr5V7e8DU"}]},"maintainers":[{"name":"ahwayakchih","email":"ahwayakchih@neoni.net"}],"_npmUser":{"name":"ahwayakchih","email":"ahwayakchih@neoni.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/logify_1.2.0_1568268026753_0.8013784399893957"},"_hasShrinkwrap":false},"2.0.0":{"name":"@ahwayakchih/logify","version":"2.0.0","description":"Turn objects/values into JSON string safely, keep result easy on the eyes","main":"index.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"c8":"^5.0.4","docdash":"^1.1.1","eslint":"^6.5.1","eslint-plugin-jsdoc":"^15.9.5","jsdoc":"^3.6.3","tap-diff":"^0.1.1","tape":"^4.11.0","tape-catch":"^1.0.6"},"scripts":{"publish":"npm publish --access public","test":"node test/index.js | tap-diff","precheckCoverage":"rm -rf ./reports/coverage","checkCoverage":"c8 --clean --report --reporter text --reporter html --reports-dir reports/coverage node --allow-natives-syntax ./test/index.js","postcheckCoverage":"echo Coverage results saved to '`reports/coverage/index.html`'","precheckStyle":"rm -f ./reports/eslint.txt","checkStyle":"eslint index.js test/** > ./reports/eslint.txt || echo 'ESLint results saved to `reports/eslint.txt`' && cat ./reports/eslint.txt","predoc":"rm -rf ./reports/jsdoc","doc":"jsdoc -d reports/jsdoc -c .jsdoc.json --readme README.md index.js","postdoc":"echo 'Documentation available at `reports/jsdoc/index.html`'","checkAudit":"npm shrinkwrap && npm audit > ./reports/audit.log || cat ./reports/audit.log; rm npm-shrinkwrap.json"},"keywords":["log","JSON","stringify","circular","reference"],"author":{"name":"Marcin Konicki","url":"https://ahwayakchih.neoni.net"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/ahwayakchih/logify.git"},"bugs":{"url":"https://github.com/ahwayakchih/logify/issues"},"homepage":"https://github.com/ahwayakchih/logify#readme","gitHead":"2ca90a69401797b3db5018b4170908a49851efb8","_id":"@ahwayakchih/logify@2.0.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-3H5e0mz0/b3JLviYtiB87lXt3DwYxFHu6F25jvX+O5XeNTZrXQkY5KpJNRfTiClUh+wmWf9RWWItoQUKXhiFRw==","shasum":"29c8f0b1ae7dcf31e939dd5268e2b4f5db95805c","tarball":"https://registry.npmjs.org/@ahwayakchih/logify/-/logify-2.0.0.tgz","fileCount":4,"unpackedSize":8686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlFvkCRA9TVsSAnZWagAAdSAP/jt2ACAU8+qA6dXPGvcD\nHJM02vocQR8qlCJtIpPCqGec7DS65Qoju8XxfAYmHoAXm+52jH9BX8m3W5D6\nqV9gZGG2oUA6h3R9UEAWp8N5DbXAAfa/64WroNIeo1FlzQeLoXFCNsDXo/6k\nPmAHylVD2WBZHftFuTrBMolkNPcdNuovcNp5IrMB6ZgKdyDHnsLiSHVmmMl9\n4U45c9L8my6hBcI41HsIE7E5qWdVIJRPj7f+VbYkmClFaJsgtNwTqb4Y3WbB\n0V2xuEVHU4ud8Cg9QlMoGPPjZaXKLZlWuWXEdShUxIs4gvF+Cw/gRiRBja7o\n0Bl/kzaZ/bJdhd8dYyVnv+QYFtDex876ivzfwUPiYmr+rMuETWTw5gqlHebN\nvZzcRlgP2uAVTR3ZGt5Z3jlv2ee4Z8uhcrZur00D4x4oFIU9CCoz0iCWnUe4\nuniqhGnO3dpeoB9ejolJyaDv8rgCzRCjHKXl+92Ogc8uNKkkjaC/YkCKMYx+\nUUc1sFw6OcLpX+HupxSZVy+w6x6Ca5PFWQONmtr4TGVLMYxTCh0HErYH6fMF\nIeHKQaxTJ+b87c3t7JUobguZ6oBgQ70gWXJ698UhZAwT/U7NzLerBRqgg8ts\na3OYm3walMJa/hZsNwcwDDldkAkuxWIoh0FCWiCSn0WS+gHeSDomGtmuHv2v\n4ie2\r\n=WD89\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICANTqBBOeqiDswbBoNRxnxbz4i4hywghfhso9d11bZEAiEAzFy3BLDTN5IU2Pf1OnyiBxhhk6Pi3gJSxnCvfMBNaBA="}]},"maintainers":[{"name":"ahwayakchih","email":"ahwayakchih@neoni.net"}],"_npmUser":{"name":"ahwayakchih","email":"ahwayakchih@neoni.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/logify_2.0.0_1570003940312_0.33845774623810354"},"_hasShrinkwrap":false}},"time":{"created":"2019-09-10T13:55:07.327Z","1.1.0":"2019-09-10T13:55:07.697Z","modified":"2022-04-04T12:14:37.277Z","1.1.1":"2019-09-10T14:00:07.192Z","1.2.0":"2019-09-12T06:00:27.027Z","2.0.0":"2019-10-02T08:12:20.414Z"},"maintainers":[{"name":"ahwayakchih","email":"ahwayakchih@neoni.net"}],"description":"Turn objects/values into JSON string safely, keep result easy on the eyes","homepage":"https://github.com/ahwayakchih/logify#readme","keywords":["log","JSON","stringify","circular","reference"],"repository":{"type":"git","url":"git+https://github.com/ahwayakchih/logify.git"},"author":{"name":"Marcin Konicki","url":"https://ahwayakchih.neoni.net"},"bugs":{"url":"https://github.com/ahwayakchih/logify/issues"},"license":"ISC","readme":"logify\n======\n\nYet another implementation of turning objects and/or values into a JSON string.\n\nThis one strives to be safe (`JSON.stringify` will throw on `bigint` and circular references) and result in a JSON that's easy on the eyes while keeping enough information:\n\n- references to objects are reported as a string with path to the first \"encounter\", e.g., `\"@one.two\"`,\n- so are circular references too, but \"@\" character is doubled, e.g., `\"@@one.two\"`,\n- `undefined` values are exported as an empty string, e.g., `\"\"`,\n- `bigint` values are exported as a string, e.g., `\"5n\"`,\n- `Buffer` values are exported as a string with it's data shown as hexadecimal, e.g., `\"[42]\"`,\n- `Infinity` values are exported as a string, i.e., `\"Infinity\"`,\n- `NaN` values are exported as a string, i.e., `\"NaN\"`,\n- regular strings are prefixed with a less-than, i.e., `\"<text\"`.\n\nIt's meant to be used for `console.log`-like output: for a quick check what's going on while debugging, and for testers to be able to quickly copy&paste information to developers.\n\nDo not use it to store data! While it's output can be parsed back to objects, result will differ from the original data.\n\n\n## Installation\n\n```sh\nnpm install @ahwayakchih/logify\n```\n\nor:\n\n```sh\nnpm install https://github.com/ahwayakchih/logify\n```\n\n\n## Usage\n\nExample code:\n\n```js\nconst logify = require('logify');\n\nconst circular = {\n  text: 'test'\n};\ncircular.circular = circular;\n\nconst o = {};\no.one = 1;\no.two = \"two\";\no.three = undefined;\no.four = null;\no.five = 5n;\no.six = {\n  oo: o,\n  a: circular\n};\no.seven = o;\no.eight = circular;\no.nine = function nine () { return 'Hello'; };\no.ten = () => 'World!';\no.eleven = {\n  f1: function () {},\n  f2: () => {}\n};\no.twelve = Buffer.from('\\x42');\no.thirteen = Infinity;\no.fourteen = NaN;\no.fifteen = [1,'2',circular,null,Infinity,NaN,15n,undefined];\no.sixteen = '<hack';\n\nconsole.log(logify(o));\n```\n\nIt should output something like this:\n\n```json\n{\n  \"one\": 1,\n  \"two\": \"<two\",\n  \"three\": \"\",\n  \"four\": null,\n  \"five\": \"5n\",\n  \"six\": {\n    \"oo\": \"@@\",\n    \"a\": {\n      \"text\": \"<test\",\n      \"circular\": \"@@six.a\"\n    }\n  },\n  \"seven\": \"@@\",\n  \"eight\": \"@six.a\",\n  \"eleven\": {},\n  \"twelve\": \"[42]\",\n  \"thirteen\": \"Infinity\",\n  \"fourteen\": \"NaN\",\n  \"fifteen\": [\n    1,\n    \"<2\",\n    \"@six.a\",\n    null,\n    \"Infinity\",\n    \"NaN\",\n    \"15n\",\n    \"\"\n  ],\n  \"sixteen\": \"<<hack\"\n}\n```\n\nBy enforcing empty spacer:\n\n```js\nconsole.log(logify(o, ''));\n```\n\nYou can get output similar to default `JSON.stringify`:\n\n```json\n{\"one\":1,\"two\":\"<two\",\"three\":\"\",\"four\":null,\"five\":\"5n\",\"six\":{\"oo\":\"@@\",\"a\":{\"text\":\"<test\",\"circular\":\"@@six.a\"}},\"seven\":\"@@\",\"eight\":\"@six.a\",\"eleven\":{},\"twelve\":\"[42]\",\"thirteen\":\"Infinity\",\"fourteen\":\"NaN\",\"fifteen\":[1,\"<2\",\"@six.a\",null,\"Infinity\",\"NaN\",\"15n\",\"\"],\"sixteen\":\"<<hack\"}\n```\n\n## Compatibility\n\nLogify uses features from ES2015, so it should be compatible with most of the up-to-date browsers and Node.js.\nTo make InternetExplorer use logify, you'll probably need some pollyfills and/or additional compile stage, e.g., using Babel.\n\nTests use features from ES2020, e.g., bigints (`1n`), so Node.js v12+ is required.\n\n## API Documentation\n\nTo generate documentation for this module, clone it from repository (package does not include required files) and use:\n\n```sh\nnpm run doc\n```\n\nIt will create HTML files inside `logify/reports/jsdoc` directory.\n\n## Testing\n\nTo run tests, clone module from repository and use:\n\n```sh\nnpm test\n```\n\nTo check coverage, use:\n\n```sh\nnpm run checkCoverage\n```\n\nTo check for any linting issues use:\n\n```sh\nnpm run checkStyle\n```\n","readmeFilename":"README.md"}