{"_id":"difflet","_rev":"61435","name":"difflet","description":"colorful diffs for javascript objects","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"time":{"modified":"2023-03-24T16:54:20.000Z","created":"2012-02-11T10:38:46.907Z","1.0.1":"2016-01-02T02:35:02.548Z","1.0.0":"2016-01-02T02:33:55.137Z","0.2.6":"2013-07-10T07:06:26.451Z","0.2.5":"2013-04-14T05:03:50.136Z","0.2.4":"2013-04-14T04:34:14.976Z","0.2.3":"2012-09-20T08:11:34.455Z","0.2.2":"2012-09-01T01:03:15.463Z","0.2.1":"2012-02-21T07:03:41.206Z","0.2.0":"2012-02-21T04:34:36.657Z","0.1.0":"2012-02-13T12:01:58.840Z","0.0.2":"2012-02-11T23:12:34.744Z","0.0.1":"2012-02-11T10:40:54.090Z","0.0.0":"2012-02-11T10:38:46.907Z"},"users":{},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"versions":{"1.0.1":{"name":"difflet","description":"colorful diffs for javascript objects","version":"1.0.1","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.6.x","charm":"0.1.x","deep-is":"0.1.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"gitHead":"91493b0f7c49abb660467c0878be58e8b2561053","bugs":{"url":"https://github.com/substack/difflet/issues"},"homepage":"https://github.com/substack/difflet#readme","_id":"difflet@1.0.1","_shasum":"189f8f9039e4ee4ac3ea943d4de66d259965b13c","_from":".","_npmVersion":"3.4.1","_nodeVersion":"4.2.1","_npmUser":{"name":"substack","email":"substack@gmail.com"},"dist":{"shasum":"189f8f9039e4ee4ac3ea943d4de66d259965b13c","size":6055,"noattachment":false,"key":"/difflet/-/difflet-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-1.0.1.tgz"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1451702102548,"_cnpm_publish_time":1451702102548,"_hasShrinkwrap":false},"1.0.0":{"name":"difflet","description":"colorful diffs for javascript objects","version":"1.0.0","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.6.x","charm":"0.1.x","deep-is":"0.1.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"gitHead":"22034c0586217b832d46a6b7acd3e87d42111340","bugs":{"url":"https://github.com/substack/difflet/issues"},"homepage":"https://github.com/substack/difflet#readme","_id":"difflet@1.0.0","_shasum":"16916b556c11a930434b793416aa4be7b397b433","_from":".","_npmVersion":"3.4.1","_nodeVersion":"4.2.1","_npmUser":{"name":"substack","email":"substack@gmail.com"},"dist":{"shasum":"16916b556c11a930434b793416aa4be7b397b433","size":5528,"noattachment":false,"key":"/difflet/-/difflet-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-1.0.0.tgz"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1451702035137,"_cnpm_publish_time":1451702035137,"_hasShrinkwrap":false},"0.2.6":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.2.6","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.6.x","charm":"0.1.x","deep-is":"0.1.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"readmeFilename":"README.markdown","bugs":{"url":"https://github.com/substack/difflet/issues"},"_id":"difflet@0.2.6","dist":{"shasum":"ab23b31f5649b6faa8e3d2acbd334467365ca6fa","size":4789,"noattachment":false,"key":"/difflet/-/difflet-0.2.6.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.2.6.tgz"},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1373439986451,"_hasShrinkwrap":false,"_cnpm_publish_time":1373439986451},"0.2.5":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.2.5","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.6.x","charm":"0.0.x","deep-is":"0.1.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"readmeFilename":"README.markdown","_id":"difflet@0.2.5","dist":{"shasum":"fe29ebfebfe5b7de9a12336b2789a7b69963cf7c","size":4780,"noattachment":false,"key":"/difflet/-/difflet-0.2.5.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.2.5.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1365915830136,"_hasShrinkwrap":false,"_cnpm_publish_time":1365915830136},"0.2.4":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.2.4","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.6.x","charm":"0.0.x","deep-is":"0.1.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"readmeFilename":"README.markdown","_id":"difflet@0.2.4","dist":{"shasum":"c7ce0ea2acd637d7c952407bce2b5cdb2b20a2db","size":4706,"noattachment":false,"key":"/difflet/-/difflet-0.2.4.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.2.4.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1365914054976,"_hasShrinkwrap":false,"_cnpm_publish_time":1365914054976},"0.2.3":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.2.3","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.6.x","charm":"0.0.x","deep-equal":"0.0.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"_id":"difflet@0.2.3","dist":{"shasum":"e8a044592d46e22e79ed653f446fd2f21c106038","size":4589,"noattachment":false,"key":"/difflet/-/difflet-0.2.3.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.2.3.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1348128694455,"_hasShrinkwrap":false,"_cnpm_publish_time":1348128694455},"0.2.2":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.2.2","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.6.x","charm":"0.0.x","deep-equal":"0.0.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"_id":"difflet@0.2.2","dist":{"shasum":"c7596fa7819a3c2d2cb60784bed9099462f67eee","size":4659,"noattachment":false,"key":"/difflet/-/difflet-0.2.2.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.2.2.tgz"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1346461395463,"_hasShrinkwrap":false,"_cnpm_publish_time":1346461395463},"0.2.1":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.2.1","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.6.x","charm":"0.0.x","deep-equal":"0.0.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"difflet@0.2.1","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"81d11e33fc1534805a76e4a321afc8ea3059be1e","size":4513,"noattachment":false,"key":"/difflet/-/difflet-0.2.1.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.2.1.tgz"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1329807821206,"_hasShrinkwrap":false,"_cnpm_publish_time":1329807821206},"0.2.0":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.2.0","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.6.x","charm":"0.0.x","deep-equal":"0.0.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"difflet@0.2.0","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"1cca8a2b20be7de65d3cc3c00dcad884d52e7ade","size":4481,"noattachment":false,"key":"/difflet/-/difflet-0.2.0.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.2.0.tgz"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1329798876657,"_hasShrinkwrap":false,"_cnpm_publish_time":1329798876657},"0.1.0":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.1.0","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.5.x","charm":"0.0.x","deep-equal":"0.0.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"difflet@0.1.0","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"814c5810e5897689ac24049708601d03a4aaec21","size":3893,"noattachment":false,"key":"/difflet/-/difflet-0.1.0.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.1.0.tgz"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1329134518840,"_hasShrinkwrap":false,"_cnpm_publish_time":1329134518840},"0.0.2":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.0.2","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.5.x","charm":"0.0.x","deep-equal":"0.0.x"},"devDependencies":{"tap":"0.1.x","ent":"0.0.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"difflet@0.0.2","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"abf1a8712f31da9c8db3811481919d7b0a082e93","size":3577,"noattachment":false,"key":"/difflet/-/difflet-0.0.2.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.0.2.tgz"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1329001954744,"_hasShrinkwrap":false,"_cnpm_publish_time":1329001954744},"0.0.1":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.0.1","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.5.x","charm":"0.0.x","deep-equal":"0.0.x"},"devDependencies":{"tap":"0.1.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"difflet@0.0.1","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"908a0ed8c02abea4b1ded6c78662177deff8c5a4","size":3220,"noattachment":false,"key":"/difflet/-/difflet-0.0.1.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.0.1.tgz"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1328956854090,"_hasShrinkwrap":false,"_cnpm_publish_time":1328956854090},"0.0.0":{"name":"difflet","description":"colorful diffs for javascript objects","version":"0.0.0","repository":{"type":"git","url":"git://github.com/substack/difflet.git"},"main":"index.js","keywords":["diff","object","compare"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"tap test/*.js"},"dependencies":{"traverse":"0.5.x","charm":"0.0.x","deep-equal":"0.0.x"},"devDependencies":{"tap":"0.1.x"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"difflet@0.0.0","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"e01cd9f4984e8f0a223c4f22f2fc73b5a4330cd7","size":3223,"noattachment":false,"key":"/difflet/-/difflet-0.0.0.tgz","tarball":"http://name.csiicloud.com:7001/difflet/download/difflet-0.0.0.tgz"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"publish_time":1328956726907,"_hasShrinkwrap":false,"_cnpm_publish_time":1328956726907}},"readme":"difflet\n=======\n\nCreate colorful diffs for javascript objects.\n\nexample\n=======\n\nstring.js\n---------\n\n``` js\nvar difflet = require('difflet');\n\nvar s = difflet.compare({ a : 2, c : 5 }, { a : 3, b : 4 });\nprocess.stdout.write(s);\n```\n\noutput:\n\n![colorful output](http://substack.net/images/screenshots/difflet_string.png)\n\ncolors.js\n---------\n\n``` js\nvar diff = require('difflet')({ indent : 2 });\n\nvar prev = {\n    yy : 6,\n    zz : 5,\n    a : [1,2,3],\n    fn : 'beep',\n    c : { x : 7, z : 3 }\n};\n\nvar next = {\n    a : [ 1, 2, \"z\", /beep/, new Buffer(3) ],\n    fn : function qqq () {},\n    b : [5,6,7],\n    c : { x : 8, y : 5 }\n};\n\ndiff(prev, next).pipe(process.stdout);\n```\n\noutput:\n\n![colorful output](http://substack.net/images/screenshots/difflet_colors.png)\n\ngreen for inserts, blue for updates, red for deletes\n\nmethods\n=======\n\nvar difflet = require('difflet')\n\nvar diff = difflet(opts={})\n---------------------------\n\nCreate a difflet from optional options `opts`.\n\nWith `opts.start(type, stream)` and `opts.stop(type, stream)`,\nyou can write custom handlers for all the types of differences:\n`'inserted'`, `'updated'`, and `'deleted'`.\nBy default green is used for insertions, blue for updates, and red for\ndeletions.\n\nIf `opts.indent` is set, output will span multiple lines and `opts.indent`\nspaces will be used for leading whitespace.\n\nIf `opts.comma === 'first'` then commas will be placed at the start of lines.\n\nSetting `opts.comment` to `true` will turn on comments with the previous\ncontents like this:\n\nSetting `opts.deepEqual` allows a different equality function to be used. By default\n[deep-is](https://npmjs.org/package/deep-is) is used.\n\n![object comments](http://substack.net/images/screenshots/difflet_object_comments.png)\n\ndiff(prev, next)\n----------------\n\nReturn a stream with the colorful changes between objects `prev` and `next`.\n\ndiff.compare(prev, next)\n------------------------\n\nReturn a string with the colorful changes between `prev` and `next`.\n\ndifflet.compare(prev, next)\n---------------------------\n\nReturn a string with the colorful changes between `prev` and `next` with the\ndefault options.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install difflet\n```\n\ntest\n====\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm test\n```\n\nlicense\n=======\n\nCopyright (C) 2012, 2013 James Halliday <mail@substack.net>\n\nLicensed under the MIT license, see LICENSE for details.\n","_attachments":{},"homepage":"https://github.com/substack/difflet#readme","bugs":{"url":"https://github.com/substack/difflet/issues"},"license":"MIT"}