{"_id":"differently","_rev":"300391","name":"differently","description":"Compare JS Objects With Color Difference.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"zvr","email":""}],"time":{"modified":"2024-01-31T16:08:30.000Z","created":"2019-04-29T16:41:47.746Z","1.0.1":"2019-04-29T17:11:31.335Z","1.0.0":"2019-04-29T16:41:47.746Z"},"users":{},"author":{"name":"Anton","email":"anton@adc.sh"},"repository":{"type":"git","url":"git://github.com/contexttesting/differently.git"},"versions":{"1.0.1":{"name":"differently","version":"1.0.1","description":"Compare JS Objects With Color Difference.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","spec":"yarn t test/spec","mask":"yarn t test/mask","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc -o README.md","b":"alamode src -o build -s","d":"yarn-s d1 externs","d1":"typal src -c","externs":"typal externs.js -e","build":"yarn-s d b doc","e":"alanode"},"repository":{"type":"git","url":"git://github.com/contexttesting/differently.git"},"keywords":["differently","diff","difference","object","js","javascript"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/contexttesting/differently/issues"},"homepage":"https://github.com/contexttesting/differently#readme","devDependencies":{"alamode":"^1.9.3","documentary":"^1.24.1","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"^3.11.6"},"dependencies":{"erte":"^1.2.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"differently@1.0.1","dist":{"shasum":"1a5c158fd98c686f9310a05899a59ac1a4bd6d08","size":4041,"noattachment":false,"key":"/differently/-/differently-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/differently/download/differently-1.0.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/differently_1.0.1_1556557891219_0.5946270900573045"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:40.212Z","publish_time":1556557891335,"_cnpm_publish_time":1556557891335},"1.0.0":{"name":"differently","version":"1.0.0","description":"Compare JS Objects With Color Difference.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","spec":"yarn t test/spec","mask":"yarn t test/mask","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc -o README.md","b":"alamode src -o build -s","d":"yarn-s d1 externs","d1":"typal src -c","externs":"typal externs.js -e","build":"yarn-s d b doc","e":"alanode"},"externs":"externs.js","repository":{"type":"git","url":"git://github.com/contexttesting/differently.git"},"keywords":["differently","diff","difference","object","js","javascript"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/contexttesting/differently/issues"},"homepage":"https://github.com/contexttesting/differently#readme","devDependencies":{"alamode":"^1.9.3","documentary":"^1.24.1","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"^3.11.6"},"dependencies":{"erte":"^1.2.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"differently@1.0.0","dist":{"shasum":"f5d971d68f5feaa2046792392dcb3aab71bc791c","size":4030,"noattachment":false,"key":"/differently/-/differently-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/differently/download/differently-1.0.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/differently_1.0.0_1556556107620_0.7115983964621144"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:39.351Z","publish_time":1556556107746,"_cnpm_publish_time":1556556107746}},"readme":"# differently\n\n[![npm version](https://badge.fury.io/js/differently.svg)](https://npmjs.org/package/differently)\n\n`differently` Compares JS Objects With Color Difference.\n\n```sh\nyarn add differently\n```\n\n## Table Of Contents\n\n- [Table Of Contents](#table-of-contents)\n- [API](#api)\n- [`differently(objectA: *, objectB: *): string`](#differentlyobjecta-objectb--string)\n- [Copyright](#copyright)\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/0.svg?sanitize=true\"></a></p>\n\n## API\n\nThe package is available by importing its default function:\n\n```js\nimport differently from 'differently'\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/1.svg?sanitize=true\"></a></p>\n\n## `differently(`<br/>&nbsp;&nbsp;`objectA: *,`<br/>&nbsp;&nbsp;`objectB: *,`<br/>`): string`\n\nCompares the two given objects recursively. Returns the string containing the highlighted difference between the compared values. This is meant to work with `deepEqual`, where the order of elements in the array matters.\n\n```js\nimport differently from 'differently'\n\ns = differently(null, {})\nlog(s)\n\ns = differently({}, null)\nlog(s)\n\ns = differently(new Date(2018, 10), new Date(2017, 10))\nlog(s)\n\ns = differently(new Date(2018, 10), [])\nlog(s)\n\ns = differently(['test'], {})\nlog(s)\n\ns = differently(10, '11')\nlog(s)\n\ns = differently(Symbol('test'), false)\nlog(s)\n\ns = differently(Symbol('test'), new Date(2019, 10))\nlog(s)\n\ns = differently({ a: 0, test: 1, common: {\n  tt: 10,\n  ta: [1, 3],\n} }, { a: 0, testa: 2, common: {\n  tt: 20,\n  ta: [1, 2],\n} })\nlog(s)\n\nlog(differently([1], [2, Infinity]))\n```\n\n<table>\n<tr><th>Output</th><th>CLI</th></tr>\n<tr><td>\n\n```\n- null\n+ [object Object]\n\n- [object Object]\n+ null\n\n- Thu Nov 01 2018 00:00:00 GMT+0300 (MSK)\n+ Wed Nov 01 2017 00:00:00 GMT+0300 (MSK)\n\n- Thu Nov 01 2018 00:00:00 GMT+0300 (MSK)\n+ Array[]\n\n- Array[test]\n+ [object Object]\n\n- 10\n+ 11\n\n- Symbol(test)\n+ false\n\n- Symbol(test)\n+ Fri Nov 01 2019 00:00:00 GMT+0300 (MSK)\n\n- test: 1\n+ testa: 2\n  common\n    tt\n    - 10\n    + 20\n    ta.Array\n    [1]\n    - 3\n    + 2\n\n[0]\n- 1\n+ 2\n[1]\n+ Infinity\n```\n</td><td>\n\n![Showing the color differently](doc/doc.png)\n</td></tr>\n</table>\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/2.svg?sanitize=true\"></a></p>\n\n## Copyright\n\n\n  (c) [Context Testing](https://contexttesting.com) 2019\n\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/-1.svg?sanitize=true\"></a></p>","_attachments":{},"homepage":"https://github.com/contexttesting/differently#readme","bugs":{"url":"https://github.com/contexttesting/differently/issues"},"license":"MIT"}