{"_id":"patcher","_rev":"25-0a292f8fb9bb4887272d5f97f226e0cb","name":"patcher","description":"Object patching and replication for JavaScript","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"patcher","version":"0.0.1","description":"Object patching and replication for javascript","main":"./index.js","keywords":["replication","patching"],"repository":{"type":"git","url":"git://github.com/mikolalysenko/patcher.js.git"},"directories":{"lib":".","examples":"./examples"},"dependencies":{},"devDependencies":{},"engine":{"node":">=0.4.0"},"author":{"name":"Mikola Lysenko","email":"mikolalysenko@gmail.com","url":"http://0fps.wordpress.com"},"_npmJsonOpts":{"file":"/home/mikola/.npm/patcher/0.0.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"patcher@0.0.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.27","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"fcb119a871c150a3dce83b07aa57463749c8b03a","tarball":"https://registry.npmjs.org/patcher/-/patcher-0.0.1.tgz","integrity":"sha512-TbosqIGvLwOiclBPXc1QA6gnr78tGTQQ3sfIShiKDmLSwEef8PRIoEQ4OPs6aajSi3ui9FgfCmjffKOP+LKyMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEFso5ai1I+d/JoKoY6ET0Z2PpbSbFvScDkBgWU1wRO1AiEAl/ToB27any6XN+7MKIAKiom1LBypk6vEpAX0+pofCuE="}]},"maintainers":[{"name":"mikola","email":"mikolalysenko@gmail.com"}]},"0.0.2":{"name":"patcher","version":"0.0.2","description":"Object patching and replication for javascript","main":"./index.js","keywords":["replication","patching"],"repository":{"type":"git","url":"git://github.com/mikolalysenko/patcher.js.git"},"directories":{"lib":".","examples":"./examples"},"dependencies":{},"devDependencies":{},"engine":{"node":">=0.4.0"},"author":{"name":"Mikola Lysenko","email":"mikolalysenko@gmail.com","url":"http://0fps.wordpress.com"},"_npmUser":{"name":"mikola","email":"mikolalysenko@gmail.com"},"_id":"patcher@0.0.2","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"bff3a9f972af5cbe92e4c23b0ddbb50fcfc8b4a7","tarball":"https://registry.npmjs.org/patcher/-/patcher-0.0.2.tgz","integrity":"sha512-br5yaNwdxJwIeO1uXvPDY0nv8kNk3SOtPcmQFOiY4+gIeIUOqK6aopSg5x8tyZqOjj3DxMDa9t/tp1tmB6vpVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD25GRCzon3alxXDtHuFm7qNI3u21kenjR4zGaidLdH/wIgQ7yErlJ33fu3URl65vhOM24oyjRrWUtqvBWr1ihBwjY="}]},"maintainers":[{"name":"mikola","email":"mikolalysenko@gmail.com"}]},"0.0.3":{"name":"patcher","version":"0.0.3","description":"Object patching and replication for javascript","main":"./index.js","keywords":["replication","patching"],"repository":{"type":"git","url":"git://github.com/mikolalysenko/patcher.js.git"},"directories":{"lib":".","examples":"./examples"},"dependencies":{},"devDependencies":{},"engine":{"node":">=0.4.0"},"author":{"name":"Mikola Lysenko","email":"mikolalysenko@gmail.com","url":"http://0fps.wordpress.com"},"_npmUser":{"name":"mikola","email":"mikolalysenko@gmail.com"},"_id":"patcher@0.0.3","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"f0c5db5ef33012076f2612a79dfee5e6524e6293","tarball":"https://registry.npmjs.org/patcher/-/patcher-0.0.3.tgz","integrity":"sha512-HhpllI/lfVh/I5ZvBSTXEsFcratjFT7Mr/ainMKxuIiICTYehjJh0vSkpovzFPenvj5qjtiMN8VQbW3mGsZFUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCXRSVsn0nC9vNrh6bVkudie2eZP2Qqa5oIxxRpI84mQIhAIuWxju7g+uXoJpAwXoXSCwpNgTRW2OsJxLb4qnacHq6"}]},"maintainers":[{"name":"mikola","email":"mikolalysenko@gmail.com"}]},"0.0.4":{"name":"patcher","version":"0.0.4","description":"Object patching and replication for javascript","main":"./index.js","keywords":["replication","patching"],"repository":{"type":"git","url":"git://github.com/mikolalysenko/patcher.js.git"},"directories":{"lib":".","examples":"./examples"},"dependencies":{},"devDependencies":{},"engine":{"node":">=0.4.0"},"author":{"name":"Mikola Lysenko","email":"mikolalysenko@gmail.com","url":"http://0fps.wordpress.com"},"_npmUser":{"name":"mikola","email":"mikolalysenko@gmail.com"},"_id":"patcher@0.0.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"f9edaa65ba4222a081fdf1d826116aca7206daa4","tarball":"https://registry.npmjs.org/patcher/-/patcher-0.0.4.tgz","integrity":"sha512-Qh3v+M4TFh6leXB/ySXHpARbPZDyN2dUYpkVmSbfHBl1V9P4K14pAC5Yc7aY48eMSPn2/2JHJoIwNnwenmFLeA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBOu+mtMle+O7q82IzQonpTYipljLuqR8zzZ71yZlK4ZAiA4fHoD2kbYhfAbVsmLLwXTqfF18y1TFY23IkqZ2Cxybg=="}]},"maintainers":[{"name":"mikola","email":"mikolalysenko@gmail.com"}]},"0.0.5":{"name":"patcher","version":"0.0.5","description":"Object patching and replication for javascript","main":"./index.js","keywords":["replication","patching"],"repository":{"type":"git","url":"git://github.com/mikolalysenko/patcher.js.git"},"directories":{"lib":".","examples":"./examples"},"dependencies":{},"devDependencies":{},"engine":{"node":">=0.4.0"},"author":{"name":"Mikola Lysenko","email":"mikolalysenko@gmail.com","url":"http://0fps.wordpress.com"},"_npmUser":{"name":"mikola","email":"mikolalysenko@gmail.com"},"_id":"patcher@0.0.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"7db1f34fc754082637030a6e2a4610636a6ebc80","tarball":"https://registry.npmjs.org/patcher/-/patcher-0.0.5.tgz","integrity":"sha512-+xSI51VYZIJeamMpndQXlNvl4YB6lz5pYvVryMlvSlaa8CdHPEeRXGTt3FnjgdUvWMjFsJMHsyvkoyvoGNsOwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCs696dBkV9wdtm4J1a0aUTOmEkHX7Usdhf64DEjPMMjwIgGTfmXw9LKiJZxJkHnTsmCovLLYx/QjEOU1+uTHU4DsI="}]},"maintainers":[{"name":"mikola","email":"mikolalysenko@gmail.com"}]},"0.0.6":{"name":"patcher","version":"0.0.6","description":"Object patching and replication for JavaScript","main":"./index.js","keywords":["replication","patching"],"repository":{"type":"git","url":"https://github.com/mikolalysenko/patcher.js"},"directories":{"lib":".","examples":"./examples"},"dependencies":{},"devDependencies":{},"engine":{"node":">=0.4.0"},"author":{"name":"Mikola Lysenko","email":"mikolalysenko@gmail.com","url":"http://0fps.wordpress.com"},"bugs":{"url":"https://github.com/mikolalysenko/patcher.js/issues"},"homepage":"https://github.com/mikolalysenko/patcher.js","_id":"patcher@0.0.6","dist":{"shasum":"f1cf39f17f6024b54b849ae3a5e46647486b51fb","tarball":"https://registry.npmjs.org/patcher/-/patcher-0.0.6.tgz","integrity":"sha512-51C/N7sZ1ramUQpumHszCyg24uHrAPmHxg+ATbJwvLboH3X2ZgDFdL0gGQ1HPepA4z8/4vB1xu0PkiKYsL5R2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDm91SKWxaTlmh5NcgowqkRSZDG8jyWQ9Ir0o64pOCTTAiAg3wgmyRg7aIgWHYBabIO9z0HnSbgbB786izSf3UckVw=="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]}},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"time":{"modified":"2022-11-08T10:38:55.787Z","created":"2011-10-07T23:19:11.680Z","0.0.1":"2011-10-07T23:19:12.961Z","0.0.2":"2011-11-03T15:32:33.526Z","0.0.3":"2011-11-03T15:37:07.350Z","0.0.4":"2011-11-03T15:40:30.982Z","0.0.5":"2011-11-03T15:42:01.980Z","0.0.6":"2014-02-11T03:19:05.510Z"},"author":{"name":"Mikola Lysenko","email":"mikolalysenko@gmail.com","url":"http://0fps.wordpress.com"},"repository":{"type":"git","url":"https://github.com/mikolalysenko/patcher.js"},"users":{"nrw":true,"klyngbaek":true},"readme":"\n              _        _               _     \n             | |      | |             (_)    \n  _ __   __ _| |_  ___| |__   ___ _ __ _ ___ \n | '_ \\ / _` | __|/ __| '_ \\ / _ \\ '__| / __|\n | |_) | (_| | |_| (__| | | |  __/ | _| \\__ \\\n | .__/ \\__,_|\\__|\\___|_| |_|\\___|_|(_) |___/\n | |                                 _/ |    \n |_|                                |__/     \n\n=================================================\n\n   A JSON patching and diffing library\n   \n    (c) 2011 Mikola Lysenko\n   \n=================================================\n\n1. About\n\npatcher.js is a simple javascript library for diffing and\npatching JSON documents.  This can be useful, for example,\nin a networked environment where retransmitting large JSON\ndocuments is too expensive.\n\n\n2. Example:\n\n>\n> //Start with two distinct objects on the server\n> // prev represents a copy of the state of the object on the client\n> // next represents a copy of the state of the object on the server\n> //\n> //1. Compute a patch\n> patch = patcher.computePatch(prev, next);\n> \n> //2. Send patch over the network\n>\n> //3. Apply the patch on the client\n> patcher.applyPatch(prev, patch);\n> \n> //Final invariant:\n> //   prev represents an equivalent object to JSON.parse(JSON.stringify(next))\n>\n\n\n\n3.  API\n\nThere are two functions in patcher.js:\n\n  function computePatch(prev, next, update_in_place);\n\n  The argument prev is the object which the patch targets.\n  \n    * If update_in_place is set to true, then the function\n    will simultaneously update both prev and next at the same\n    time.\n    * If prev and next are equal, then the method returns null\n    * Constructing this patch requires time linear on the \n    size of the two documents.\n    * Patches are computed at the level of the objects and\n    arrays.  String modifications are simply retransmitted\n    \n  \n  \n  function applyPatch(obj, patch)\n  \n  This function applies a patch to the JSON document obj\n\n\n4. Future\n\n  * More test cases!\n  * Use data types cleverly\n  * Binary serialization\n","readmeFilename":"README"}