{"_id":"cradle","_rev":"126-2393858ad883d5a6443357f623e91548","name":"cradle","description":"the high-level, caching, CouchDB library","dist-tags":{"latest":"0.7.1","stable":"0.2.5","unstable":"0.5.0"},"versions":{"0.1.0":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{},"lib":"lib","version":"0.1.0","_id":"cradle@0.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.1.0.tgz","shasum":"ba7d01f2450ccf5415b4850974f0a760c8507b49","integrity":"sha512-2uwrD6QHsg9zC0r7Fq9uDKWhqaVcw5MB+qvLlaVjbq2phqDOnfnBJM8Md1E4ujM6wKol2olrJIrgVSURCQPW7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEbCxUYgUUBtE83KYZTaEzl24V1uA3PWRWKriywh770AIhAPN+nubcp0xdWz5kl1Hs8sIC9D80mse8MdmM741zhjxS"}]},"directories":{}},"0.1.2":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.2.0"},"version":"0.1.2","main":"./lib/cradle","directories":{"lib":"./lib","test":"./test"},"engines":{"node":">=0.1.93"},"_id":"cradle@0.1.2","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.1.2.tgz","shasum":"d4e0312c41a3ab6c7f105c3a014a641d2630aa28","integrity":"sha512-Br903/xhS7QNjpPC9XYYaXS+KQjTM5UNj0+wL7cJVaZ8nDOm6bfHEYnuPTo7K/aEFxCat3PUDGo9ZPtHCk1MHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFRmo5XJNmUOH3ed6Ju7S+4mdtMtOKd6KKwKG8MlEO8hAiEAymJWZYziddK4cxyTI8FvpAcPp1J7PyiB/wfg+zGhCDQ="}]}},"0.1.3":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.2.0"},"version":"0.1.3","main":"./lib/cradle","directories":{"lib":"./lib","test":"./test"},"engines":{"node":">=0.1.93"},"_id":"cradle@0.1.3","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.1.3.tgz","shasum":"3fdcdf1daa3da113ab293f3681e30cbb1396011d","integrity":"sha512-2QN8/eu3P7jICwa5f3kWcPDMC3+UNIswREkjxwEdlguxftMoDKV87UoARunP+pPtynO55Qe6HRN3VkEEc3bFmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0g1GESorTPtxRtISj7yMTA/Ls1ZjbU0c01INzpuHNUAiB3H5svM8bdj8XPSipWxJuEd9TAAepY8uGPYoyH4tr3rw=="}]}},"0.1.4":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.2.0"},"version":"0.1.4","main":"./lib/cradle","directories":{"lib":"./lib","test":"./test"},"engines":{"node":">=0.1.95"},"_id":"cradle@0.1.4","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.1.4.tgz","shasum":"6c6314a01e43e599317997df70c6acc0f1a08814","integrity":"sha512-xFky7cTMb5eHPHchxW36OiVblQaYtNR5gRMIFuvS2/9mr8NAb0T7LngbApbcpgysHdhnPqR+RcG1BeDKu0a+gg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID1zeO/gp/s0muavhp4x2GyVHW1mw76SoYjf8FKhSSDtAiEAztBt3OrDgpglZNYHqviLFuVm0UEgS35hcYypbYKq4EQ="}]}},"0.1.5":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.3.0"},"version":"0.1.5","main":"./lib/cradle","directories":{"lib":"./lib","test":"./test"},"engines":{"node":">=0.1.95"},"_id":"cradle@0.1.5","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.1.5.tgz","shasum":"22e5f757d0c652d5ba7c26b901a3e23e4fe4f897","integrity":"sha512-oiu8lNIIUa+A9dLdJqKQ/7Um9s7F9kSSRanjHbtyQV+l4KD/GwLckr3E5Y+De7Ygizlr/9SW2J9DHBM8geUxSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXyGJ0jMXhekKhPgLjaSFt1DMaO9UbDDpBhjSGAsl0fAiEAz9d1v+PLGj4H43GGe4vnBrtm0yGWX3JDH1pZPGGxxKw="}]}},"0.2.0":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.2.0","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.1.100"},"_id":"cradle@0.2.0","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.2.0.tgz","shasum":"14bd1551d892889af970e58fbdf6485f128dd9ad","integrity":"sha512-em5eOsiNmtPFwCPnLN4BjLJ5+1Y7+j4MhThWWjSIOgbnj5T+dRWNaycB/opvf5GOgLajigl0Ad3VKdo497Akow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF3RkeFFAmkCrnIiBB5Rk6mlvGlhIOD4FZ9otco5+gMPAiEAp71gF8KYIOIqVGWnAb9hCQA+SikhtYPSiNpEklMpmHc="}]}},"0.2.0-pre":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.3.0"},"version":"0.2.0-pre","main":"./lib/cradle","directories":{"lib":"./lib","test":"./test"},"engines":{"node":">=0.1.95"},"_id":"cradle@0.2.0-pre","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.2.0-pre.tgz","shasum":"33bb6231d36d568d6470c81a0222d0fdd5675909","integrity":"sha512-/qluLTbbRwEQMotjjMbx8hUTlVGgcCBkgMZ2oWbg2WvGXOz5/fsPIR/hVOIUl01oimQg+DvDjgG35fR7bpJ8VQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFeQIZ2qTsZ2z5+gFyiWvjoWZK5kGHiUCtNqRHjP4noLAiBzBcbakVTqcUE43YYoR9HYE7JF6F8ADPV4N0iJyqHGPA=="}]}},"0.2.0-pre2":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.3.0"},"version":"0.2.0-pre2","main":"./lib/cradle","directories":{"lib":"./lib","test":"./test"},"engines":{"node":">=0.1.95"},"_id":"cradle@0.2.0-pre2","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.2.0-pre2.tgz","shasum":"459454901f93eaf0a8754d0d37ddfaf9218499d5","integrity":"sha512-lr9tehh/2v3tRGh1xLhk61nrYdfQ2xSqW0FMLdOCfd6cvgkPE1sVy7SNkOdioD7KdLwrGxgDvamX4YXi/zhKHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2aMU02mMuLqfJ8haSFN88sGrHcJektwZR4gcRbw8O3gIhAL03LlFR10Oz5ohwcsUiJy2inUIcjwphRCoRYRRzAGUc"}]}},"0.2.1":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.2.1","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.1.100"},"_id":"cradle@0.2.1","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.2.1.tgz","shasum":"8b961c0b17deff45a204e6aa403d951815d498d6","integrity":"sha512-Y2H9OcROZ3UVOZIP7HBk2NNgDGepIxYIsWiIcKCei+17p5OmlzTKIR0qmbQyG19edNzbIal5q8NgezE8UxhHcw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD96chkYxKyP64Vqbk4O0qT2ECVM/VW6EPeZ2NkYKYHbQIgIKYqmexJZrFuB3J2geM1/mSdu8i8H56fVc0zO5lC0yc="}]}},"0.2.2":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.2.2","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.1.100"},"_id":"cradle@0.2.2","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.2.2.tgz","shasum":"5662541f9c5b8d91d01b04ab5ecdcb6b62ff86ce","integrity":"sha512-xv/+QJnt0Zj8BjlZX10GDw426NyLDoYZIHdRKqjzL4zGVD548BwrK4KGixl4hI+3gIlZlXxadBUvRGyZAK7DzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5rr3Kt6f6Ixw9s+0Lvxbaymyl6XpWN3CYKeF3gnyIFQIhAK8gyRmiITEtKuU3tTRTLFYeUc1j2v77i+F5PTVXhL3d"}]}},"0.2.3":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.2.3","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.1.100"},"_id":"cradle@0.2.3","_nodeSupported":true,"_npmVersion":"0.2.3-6","_nodeVersion":"v0.2.3","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.2.3.tgz","shasum":"8cb55bac74ae13e7a1e62e83889545354b52000b","integrity":"sha512-4+yWvvoc+XDpvsKDUnc/jr2YJ+eRvSt9esrZwXzoxyVBz346F5kFp3B9tfO9W34tc/kQdpj2cADcxAAIPnkh6A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQ2RMxHvz1HqHQb8451RKtI5DWGU/s7V1amzT9UPNuZgIgHpnUK2g+2A7c9gPhyhHaxCl+WS3Xx9ap+8SE8TQVom0="}]}},"0.2.4":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.2.4","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.1.100"},"_id":"cradle@0.2.4","_nodeSupported":true,"_npmVersion":"0.2.8","_nodeVersion":"v0.2.5","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.2.4.tgz","shasum":"0071becc89062dbb16a79022572b96b14a58fcb9","integrity":"sha512-yblCBNKVzLoGuvTV4RYwWrW1SVYePCFQzQNdLWoEhBOcp5WNIINz4q/Kd9q3NIhYtuj1f1NJo6Rv3TFfUacyVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTU0huAkhVe6gtD4eI3M19Au78N9L6aOKYiFAc2ztvaAIhAL9oP6SkLQ5idNpSEXd+eIMRe74LYJjL+QF9VVrYDcDx"}]}},"0.2.5":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.2.5","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.1.100"},"_id":"cradle@0.2.5","_nodeSupported":true,"_npmVersion":"0.2.8","_nodeVersion":"v0.2.5","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.2.5.tgz","shasum":"f0db3ee016221c4433f81191706069ba83370492","integrity":"sha512-NjSEQIDpVy2jK74zrhtNcVn32GPfEmygIxIkomirc6KuXXxTPrbgJtAr9j1k+8lbHAdLsrA/oOYVpfnw7Oo8HQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH0pe71r98Yge15SzLfNWG39MnlErw08soquVnmv6TK6AiEA1EPlmFALYtCG8/lIl4vCIfZOFF6Q+eTspFoR+e3PX6M="}]}},"0.3.0":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.3.0","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.2.0"},"_id":"cradle@0.3.0","_nodeSupported":true,"_npmVersion":"0.2.8","_nodeVersion":"v0.2.5","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.3.0.tgz","shasum":"b7897547172061bef03e514d18c785ba4d79ed9b","integrity":"sha512-TCZowPT+FXUnigsza4R2/ZnHz7WnlMowhONygX1+960bFJGaRWX1qqjjWjUXzSrRRTgyI3FKcGGndyi1d2Ut8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFA+orMS1py+oI3mpn2nGw+rfWs4N6v0k2/wQpmIKKcdAiAGbOdcPzuoFpm31EBQ5OY3Sx4lJzBNDKg6uwIb1nICqw=="}]}},"0.3.1":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.3.1","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.2.0"},"_id":"cradle@0.3.1","_nodeSupported":true,"_npmVersion":"0.2.8","_nodeVersion":"v0.2.5","dist":{"tarball":"https://registry.npmjs.org/cradle/-/cradle-0.3.1.tgz","shasum":"df62a6329e610f672b756ede78fe81e3cc96d352","integrity":"sha512-wyTJJuIRmO23X8NfeFAb8qj7jhW1GNa5xp3bPPkanb8YYn2F0ld/WfaAT/e2Wnq8DuX6L48zC7hcMFSmwSbppg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDbHkxeyD66sIeu7WVi7KfWK+LQjIpFISFdQYUtBsDtLAiBCvC/Cwbs3tAZgxTdVr/Ub1L9mHd1JVCCPS3P+OViKKQ=="}]}},"0.4.0":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.4.0","main":"./lib/cradle","directories":{"test":"./test","lib":"./lib"},"engines":{"node":">=0.3.6"},"_id":"cradle@0.4.0","_engineSupported":true,"_npmVersion":"0.2.15","_nodeVersion":"v0.3.7-pre","modules":{"cradle.js":"lib/cradle.js","cradle/cache.js":"lib/cradle/cache.js","cradle/response.js":"lib/cradle/response.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"8bd06ebd200f862c7afc666419bfc18d8964939b","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.4.0.tgz","integrity":"sha512-G9PvljG8bS1Dqc+wCB72mToAXb+wOAbQiLgIp30lGT8E51WTLbDLeQ+LeqShRLNltBf9E5wohR+lN3sKFaXjvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLjSKgj9WTCHdZZwmGSC3lyAJlCzlg3hPTdaz1sC8XNQIgSFtjY90uZFxZDkcYSHkYwPhP9BJYe4r+E/yc4GO5dZw="}]}},"0.4.1":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.4.0"},"version":"0.4.1","main":"./lib/cradle","directories":{"test":"./test","lib":"./lib"},"engines":{"node":">=0.3.6"},"_id":"cradle@0.4.1","_engineSupported":true,"_npmVersion":"0.2.15","_nodeVersion":"v0.3.7-pre","modules":{"cradle.js":"lib/cradle.js","cradle/cache.js":"lib/cradle/cache.js","cradle/response.js":"lib/cradle/response.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"08be4254767bfb1d958569296fcfd559010a75f5","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.4.1.tgz","integrity":"sha512-F+7p4jH0lW3O4ZddRSOb2kDJov4nVebVDwJGfAwoDeDTmxaR0brTPzpF0VUqZVt43IgRaSqZcIRx0CPjYrpr4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0hUVQkifAzIvrkd4fLLPBOdhcKetauf2WId68k9BSkgIhAIWTN/gi4PcO5dOVZQ/ttbN9S8WbB1Z4Bn75PPvvEciC"}]}},"0.5.0":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.5.4"},"version":"0.5.0","main":"./lib/cradle","directories":{"test":"./test","lib":"./lib"},"engines":{"node":">=0.3.6"},"_id":"cradle@0.5.0","_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.3.7","modules":{"cradle.js":"lib/cradle.js","cradle/cache.js":"lib/cradle/cache.js","cradle/response.js":"lib/cradle/response.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"28d0ef4e1fd4c6993ce5dfa33e1859968284b409","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.5.0.tgz","integrity":"sha512-L6CXcOo5pnAqgJUgtU//FU4CWu/fMjY179n0UyrrUTlJp+5WbbSWHsGXBrqkqcwYkhtg5cIoTkj0RiiGZ8XZ0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbX2slLD5ot/IL+9GAyic5ze5bNZVgsswXOOdVqkkODQIhAK5Oefnm7lI8FXElZgMrQxSFjdJROIRoN8Xcwo5c1CIZ"}]}},"0.5.1":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.5.4"},"version":"0.5.1","main":"./lib/cradle","directories":{"test":"./test","lib":"./lib"},"engines":{"node":">=0.3.6"},"_id":"cradle@0.5.1","_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.3.7","modules":{"cradle.js":"lib/cradle.js","cradle/cache.js":"lib/cradle/cache.js","cradle/response.js":"lib/cradle/response.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"fc7336152049b3f7c713aaa9d12f82ed50db2563","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.5.1.tgz","integrity":"sha512-PoCkxaMgBR05Bp5NkyCB2SXZg7uuYPbh+HzG1Uhhegwtw7/cofDwgR5pow1lz00pUtf3vjopu3SALptOMR2Y7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDufafWiEV1VAhfx4NijrqY+Jwyni6vy+BZgX0Uuo/gRgIhALZ4PfKddqNeDCElmeIA1j+t7y28f6zBN/BrfZTCx6wV"}]}},"0.5.2":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.5.4"},"version":"0.5.2","main":"./lib/cradle","directories":{"test":"./test","lib":"./lib"},"engines":{"node":">=0.3.6"},"_id":"cradle@0.5.2","_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.3.7","modules":{"cradle.js":"lib/cradle.js","cradle/cache.js":"lib/cradle/cache.js","cradle/response.js":"lib/cradle/response.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"2d43b70af5bad3af7ee4a4db26c5d7431202e156","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.5.2.tgz","integrity":"sha512-pyUYbqXTTCUamPWBkOb7CaJz2KOTAwf89MPRfIJp6Ul5ncIHzFbjkp5xrFE6QiKepF2ENatPvWO2Oyw7jWjV+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtH16LPZXjv+ZfTlNFvM8htyBxSqlRvRWdfm2isDD/FwIhAIMUm0LczP2fS4a22U6L8bECyKxtbMXsFI3qo2sECFd9"}]}},"0.5.3":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.5.4"},"version":"0.5.3","main":"./lib/cradle","directories":{"test":"./test","lib":"./lib"},"engines":{"node":">=0.3.6"},"_id":"cradle@0.5.3","_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.4.1","modules":{"cradle.js":"lib/cradle.js","cradle/cache.js":"lib/cradle/cache.js","cradle/response.js":"lib/cradle/response.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"91c7fef8d81107bd14b265cfdaf7e5e01a563bee","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.5.3.tgz","integrity":"sha512-lUvoEeryuMLPPHHPnY1VziortGox+o66iVLi6yF8m378JcC8fzaT0L4qOjv+dYVxpsq8YGyHHPFYjrzRE7WG7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHxT9MLJ5F0xQX0/DC7dbHsb2d6zF+4mjP4a2isXr4HAiBYc+bnWqcNt6bz44KU1Q89oSKINaE3+G7liioblzml3Q=="}]}},"0.5.4":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.5.4"},"version":"0.5.4","main":"./lib/cradle","directories":{"test":"./test","lib":"./lib"},"engines":{"node":">=0.3.6"},"_id":"cradle@0.5.4","_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.4.2","modules":{"cradle.js":"lib/cradle.js","cradle/cache.js":"lib/cradle/cache.js","cradle/response.js":"lib/cradle/response.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"b2d9745e5da1ca51cd008869905b6d7c237ba9ee","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.5.4.tgz","integrity":"sha512-g+rbMMfNXl4+eF613AnZkxCHTwL3ah6+Raegt0fIeGYoUiY4i1gKFff4nz8jD4xc6q8GFLXGTSSX0eqsKQ1Q+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHMA/aq9BZz+R7EHGABeOPWkL03bw674j2GJcZai5wtwAiEAusu2aGoXulc+ZYhV6C1N2wLoQwbYHTOvPpFUDL+zpmA="}]}},"0.5.5":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.5.4"},"version":"0.5.5","main":"./lib/cradle","directories":{"test":"./test","lib":"./lib"},"engines":{"node":">=0.3.6"},"_id":"cradle@0.5.5","_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.4.2","modules":{"cradle.js":"lib/cradle.js","cradle/cache.js":"lib/cradle/cache.js","cradle/response.js":"lib/cradle/response.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"dc54c71016427ecb9b86883d46db9a19f1286c22","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.5.5.tgz","integrity":"sha512-s+kA5mEosLTy83Kdd9ZqcS2S/ht9zimvnQL6izl6YRW6iscOG+/uBRrHlrgNyVe4z1XLYTX8H0DRS1+XykkGtA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwG70kHzLwksMNKiWJHB6uBJqmmW6FWOyJeAr3FlJNJAiEAoDR/piVtSXolu4F6tvkq8GNLfbDSdHtbNtitUGfzh2M="}]}},"0.5.7":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0","vows":">=0.5.4"},"devDependencies":{"async":"~0.1.x","request":"~2.1.1"},"version":"0.5.7","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.3.6"},"_npmJsonOpts":{"file":"/Users/Charlie/.npm/cradle/0.5.7/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"cradle@0.5.7","_engineSupported":true,"_npmVersion":"1.0.23","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"c3681ac1294b9c44aab4841da4bc946672e6d7c6","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.5.7.tgz","integrity":"sha512-ny8gt2YMAR2EBtVp2lzsYt+lBk5G6ypuP3ZLKSnYAf0ky5gPEpfztQThZDspJU9IMjXAKEzZG7I04PgYK4FwbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDx/UXOsmffnPpT0Rtfsr8sa3OwrmqqpMy37XK6HT2QmgIhALSgiYRaBNO/zZ1fCJRRmNqqgjWhPoCqiIk9xp2O85wi"}]},"scripts":{},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"}]},"0.5.8":{"name":"cradle","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[],"dependencies":{"vargs":">=0.1.0"},"devDependencies":{"async":"0.1.x","request":"2.2.x","vows":"0.6.x"},"version":"0.5.8","main":"./lib/cradle","directories":{"test":"./test"},"engines":{"node":">=0.3.6"},"_npmUser":{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"},"_id":"cradle@0.5.8","_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"a46d240879d8444e79f1097422550884a4597fa4","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.5.8.tgz","integrity":"sha512-fnJXnnW/UQ1qW0Uh7AHB4LJOv0IJjsRep3gO1aPjAPxoxqkKl7Mhxx/WD+hqrzvcanO3Dgtzk9rhgvAalmTfyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOnAE1R3445LhriRssl/8eVXWp8vHrTZ3QCtQUokAsrgIgBdrcw9T4kApJ4rNa+olapSRc9Ex5DH41yWT4ecMGp8g="}]},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}]},"0.6.0":{"name":"cradle","version":"0.6.0","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.7.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.1.x","vows":"0.6.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.6.0"},"_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"_id":"cradle@0.6.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"6138a92403382fb52772e039337259b22ab0dad7","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.6.0.tgz","integrity":"sha512-y1i/9/DK6YySo65F3xFOauIpaQJEJYE2XSR8vHrHGQHZOqM9j1Ya8BOKxhU0psdgmWkJbXeUJeyL2p1ipV7yBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFVxknbbFkbW6VzutIUD1cw5MoANM+gN6X/SeVydaChHAiALvlGV+6LOdQ8sGYsDJTzpzCzo42TEtfpJlPAfhNqhrw=="}]},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}],"directories":{}},"0.6.1":{"name":"cradle","version":"0.6.1","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.7.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.1.x","vows":"0.6.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.6.0"},"_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"_id":"cradle@0.6.1","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"2432ca648ecca6530188f260bdd220473b767626","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.6.1.tgz","integrity":"sha512-VCCQGV3yivR4fTlhKPZva+yqlRVAz8noTNS0/9mkvDWcT7pdIJElYQHNIEdqOZMnP7mjBweo1TAUHS4G+lLCfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIAI3OREmMsliVsVgBPxxqIjkD8ybNdVv37eLt69Gt88OAh9CbteMNdRijXTEKSUv1yCazjxWweVdDU28XCfGI3Gk"}]},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}],"directories":{}},"0.6.2":{"name":"cradle","version":"0.6.2","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.7.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.1.x","vows":"0.6.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.6.0"},"_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"_id":"cradle@0.6.2","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.2","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"64c4ad4a9caedfa7e44d6031fb2793a9f3b5e549","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.6.2.tgz","integrity":"sha512-Z/9/GaLd2mvcg2dfLfukABi+JAKf1JHuuS9bBoxijkQzP7Nm+IP57P6TARvWh7hz+CwYGQQwWc98A/9Z2dYAVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdi2cg2Vc4VgsM4D/xY2/sxI21Y9Hi1TZwRrCsAeC3hQIhAPtXrcVJGmVwnMB1X+0TBgOZ701ISP//Drn3dkEBeC00"}]},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}],"directories":{}},"0.6.3":{"name":"cradle","version":"0.6.3","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.7.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.1.x","vows":"0.6.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.6.0"},"_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"_id":"cradle@0.6.3","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.2","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"dcaaa9ca0f4621c0ad2d79de6ed3c9965281befe","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.6.3.tgz","integrity":"sha512-o0QQ2OtF5wq0WIwonyNZB36cECr7Zx2ajQv8T/NLKWgMOK3mTN4XTxNrWMvw/ryqSYb98eP8NPF59JB/LFgKgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkE4L68MHcEyvNhNqTHZD5SdEsb0UjkMR45ns7zYuPuwIhAJWZqwhWutxFFVvEjL9DBaWRVBbB/j5/kkxZ2E4HBvE0"}]},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}],"directories":{}},"0.6.4":{"name":"cradle","version":"0.6.4","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.7.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.1.x","vows":"0.6.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.6.0"},"_id":"cradle@0.6.4","dist":{"shasum":"f4485a12186ae0bcb9550af2164b72c9245172bc","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.6.4.tgz","integrity":"sha512-xHmWjkwUgN7RmgaHh12LeEWsXpQnwAMAtb6NAJADBzoMZQPlBixPUnE2as//M++VQ26neXZwG252G7UNkPfiSg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAwMA8RYezJl7CKmwmKTWsGyzzU5ixUBgJL3r2G+GBPOAiADNBENVlrEtcTcJKxpfrSCsGEAyqDWM4Sn06HaBcJ7Ig=="}]},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}],"directories":{}},"0.6.5":{"name":"cradle","version":"0.6.5","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.8.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.1.x","vows":"0.6.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.6.0"},"_id":"cradle@0.6.5","dist":{"shasum":"4b2ef8baa38d3e6d79770ae28d8851738557097b","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.6.5.tgz","integrity":"sha512-HZCRUSXAF/JWcMTtTbwUrzoW28jfEK9TS/yki+pLMB16ji8+viX1yIxwc+DWSkL2hO/n3RRc1wfcOGrJdW05nw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGRFkc5J+ckRCi6XaDIICtza21bsrCd+arDZj31T7qrRAiEA1TzrpHYTEj+pItbnzDF6g2qv3SdSdVg7C6k8CrOSWJ4="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}],"directories":{}},"0.6.6":{"name":"cradle","version":"0.6.6","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.8.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.1.x","vows":"0.6.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.6.0"},"_id":"cradle@0.6.6","dist":{"shasum":"1259233dabe2d38c268b0bde30f7d9a740b9e35d","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.6.6.tgz","integrity":"sha512-DgOAj0uE81MExafPbLKYLLYOhqC5ZdL1dB2Ohl3td8/GQ/tB7oFNbnQHOBH+H6yeIm5nevP7qRY/g/K98qKmZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD51v9k+kpsKQp53L97cqbJ4y7ywd3e4FJkrOLMeOsyaAIgf/vAM0ITHmW3E2TXVSdnOBuDEyb86uJgcYfhRyOsY9A="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}],"directories":{}},"0.6.7":{"name":"cradle","version":"0.6.7","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.10.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.2.10","vows":"0.7.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.6.0"},"_id":"cradle@0.6.7","dist":{"shasum":"76fa52919f01e1defa2d1a6d6142dbc7f1aff945","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.6.7.tgz","integrity":"sha512-7kw4U7MhFVaTi8dlY5eYz5Q7x86JZ7QjjkaPett7vQtcJWqXeaTL/H3f+Gz4JUdq/PnoUNOYOYxCxVmtLTcqEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFrrDByvr0tuQt/O/0wmdGjJ80MSC2GvZFwWNZRCyNTkAiEA0rn0BcRWtrozw9CMrmEB+O6XzW1ONsVLtLnoGqA/aBs="}]},"_from":".","_npmVersion":"1.3.26","_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}],"directories":{}},"0.6.9":{"name":"cradle","version":"0.6.9","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.11.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.9.0","vows":"0.8.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.8.0"},"gitHead":"0e21dc27268b9917e12250076a465574fcb4faea","_id":"cradle@0.6.9","_shasum":"2cd08694ecf9ba7f5b36786fdae8a37d710e8c0a","_from":".","_npmVersion":"2.1.9","_nodeVersion":"0.10.33","_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"mmalecki","email":"maciej.malecki@notimplemented.org"}],"dist":{"shasum":"2cd08694ecf9ba7f5b36786fdae8a37d710e8c0a","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.6.9.tgz","integrity":"sha512-rWik3tEA2DnxFv+GIvdJxmQNf7rKA8eetOr/aNMkk2ViQ5n1g8EOtnh+3w59ULatn6g8FY3s2bM7eUvLxnMSUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHbu4QfOVL5tPen+qVGEitY9YBX8YbFmkt7InPHCMO5MAiEAykxC6o/BZzPaD3exTQGuEu3/rKqGTn8v+g72dvJeBNU="}]},"directories":{}},"0.7.0":{"name":"cradle","version":"0.7.0","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.11.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.9.0","proxyquire":"^1.7.3","sinon":"^1.17.2","vows":"0.8.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.8.0"},"repository":{"type":"git","url":"git+https://github.com/flatiron/cradle.git"},"license":"MIT","gitHead":"28868faf59aa038df16ea8d45e6c361a0123cd87","bugs":{"url":"https://github.com/flatiron/cradle/issues"},"homepage":"https://github.com/flatiron/cradle#readme","_id":"cradle@0.7.0","_shasum":"00986f2d2fd55099d332ca5518557a179cec3871","_from":".","_npmVersion":"3.5.0","_nodeVersion":"4.2.1","_npmUser":{"name":"nawitus","email":"panu.horsmalahti@iki.fi"},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"nawitus","email":"panu.horsmalahti@iki.fi"}],"dist":{"shasum":"00986f2d2fd55099d332ca5518557a179cec3871","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.7.0.tgz","integrity":"sha512-JiW+WoRCnb3sb1WPFayf5+JLEhwDGk7eJ1m0g4p1oS3/6FmCkT6S97ZUkfUnjK0J1G2v46MRlSNM753HGUrYzA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCX2bfHBTAodhtd4PzgBy4UELGXDsYtsFYPZOJQWKXMrwIgO20FGrrmAMLXWzjXjvL2Fq79Z5vUCjja75G1WXA8yQE="}]},"directories":{}},"0.7.1":{"name":"cradle","version":"0.7.1","description":"the high-level, caching, CouchDB library","url":"http://cloudhead.io/cradle","keywords":["couchdb","database","couch"],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"main":"./lib/cradle","dependencies":{"follow":"0.11.x","request":"2.x.x","vargs":"0.1.0"},"devDependencies":{"async":"~0.9.0","proxyquire":"^1.7.3","sinon":"^1.17.2","vows":"0.8.x"},"scripts":{"test":"node test/helpers/seed.js && vows --spec"},"engines":{"node":">=0.8.0"},"repository":{"type":"git","url":"git+https://github.com/flatiron/cradle.git"},"license":"MIT","gitHead":"20534493ae3aa0e6d80201a24b48acf19a27e4ac","bugs":{"url":"https://github.com/flatiron/cradle/issues"},"homepage":"https://github.com/flatiron/cradle#readme","_id":"cradle@0.7.1","_shasum":"4c0b354aadfb7d4ae2a8f5cdbbfd63a345061044","_from":".","_npmVersion":"3.5.0","_nodeVersion":"4.2.1","_npmUser":{"name":"nawitus","email":"panu.horsmalahti@iki.fi"},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"nawitus","email":"panu.horsmalahti@iki.fi"}],"dist":{"shasum":"4c0b354aadfb7d4ae2a8f5cdbbfd63a345061044","tarball":"https://registry.npmjs.org/cradle/-/cradle-0.7.1.tgz","integrity":"sha512-b9zdfyevLMm3dumaEQwe/DvCfF1cinCQgMZCXVk2BP2hmm3UIEVjdHqLZtsrg+P8c0F84zRSYIjwD6AJkvsJJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3erX0+C00ohgbCX1zgREreXutalLEsfttANJpbOXaAwIhAK6QYGqBX/tkBCeokf/YHsmS7JZxbDelcZrmwmSn/Z3s"}]},"directories":{}}},"maintainers":[{"name":"cloudhead","email":"self@cloudhead.net"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"nawitus","email":"panu.horsmalahti@iki.fi"}],"author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"time":{"modified":"2023-03-04T05:46:20.047Z","created":"2011-01-22T20:23:52.695Z","0.1.0":"2011-01-22T20:23:52.695Z","0.1.2":"2011-01-22T20:23:52.695Z","0.1.3":"2011-01-22T20:23:52.695Z","0.1.4":"2011-01-22T20:23:52.695Z","0.1.5":"2011-01-22T20:23:52.695Z","0.2.0":"2011-01-22T20:23:52.695Z","0.2.0-pre":"2011-01-22T20:23:52.695Z","0.2.0-pre2":"2011-01-22T20:23:52.695Z","0.2.1":"2011-01-22T20:23:52.695Z","0.2.2":"2011-01-22T20:23:52.695Z","0.2.3":"2011-01-22T20:23:52.695Z","0.2.4":"2011-01-22T20:23:52.695Z","0.2.5":"2011-01-22T20:23:52.695Z","0.3.0":"2011-01-22T20:23:52.695Z","0.3.1":"2011-01-22T20:23:52.695Z","0.4.0":"2011-01-22T20:23:52.695Z","0.4.1":"2011-01-27T01:29:00.938Z","0.5.0":"2011-01-30T22:52:09.485Z","0.5.1":"2011-02-03T19:47:24.633Z","0.5.2":"2011-02-04T00:09:40.169Z","0.5.3":"2011-03-03T04:37:58.022Z","0.5.4":"2011-03-06T23:00:51.825Z","0.5.5":"2011-03-08T01:03:39.365Z","0.5.6":"2011-09-12T18:18:15.661Z","0.5.7":"2011-09-15T04:51:54.773Z","0.5.8":"2012-01-09T22:42:17.301Z","0.6.0":"2012-02-22T04:02:02.761Z","0.6.1":"2012-02-23T08:18:10.741Z","0.6.2":"2012-03-02T03:51:02.705Z","0.6.3":"2012-03-02T05:28:39.344Z","0.6.4":"2012-09-12T14:30:03.716Z","0.6.5":"2013-03-27T03:26:23.886Z","0.6.6":"2013-05-23T07:34:41.673Z","0.6.7":"2014-02-09T03:22:00.511Z","0.6.8":"2014-12-04T18:23:30.986Z","0.6.9":"2014-12-07T23:51:20.983Z","0.7.0":"2016-01-16T17:05:44.754Z","0.7.1":"2016-01-19T17:08:28.757Z"},"users":{"fgribreau":true,"pana":true,"paintedbicycle":true,"japh":true,"roryrjb":true,"tjhart":true,"leyyinad":true,"nayrangnu":true,"webnicola":true,"buzuli":true,"erikvold":true,"ruthearle":true,"henrytseng":true,"dpjayasekara":true,"pruettti":true,"chrisx":true,"syberag":true,"darky974":true,"flumpus-dev":true},"readme":"cradle\n======\n\n[![Dependency Status](https://david-dm.org/flatiron/cradle.svg)](https://david-dm.org/flatiron/cradle)\n\nA high-level, caching, CouchDB client for Node.js\n\nintroduction\n------------\n\nCradle is an asynchronous javascript client for [CouchDB](http://couchdb.apache.org).\nIt is somewhat higher-level than most other CouchDB clients, requiring a little less knowledge of CouchDB's REST API.\nCradle also has built-in write-through caching, giving you an extra level of speed, and making document _updates_ and _deletion_ easier.\nCradle was built from the love of CouchDB and Node.js, and tries to make the most out of this wonderful marriage of technologies.\n\nphilosophy\n----------\n\nThe key concept here is the common ground shared by CouchDB and Node.js, that is, _javascript_. The other important aspect of this marriage is the asynchronous behaviors of both these technologies. Cradle tries to make use of these symmetries, whenever it can.\nCradle's API, although closely knit with CouchDB's, isn't overly so. Whenever the API can be abstracted in a friendlier, simpler way, that's the route it takes. So even though a large part of the `Cradle <--> CouchDB` mappings are one to one, some Cradle functions, such as `save()`, can perform more than one operation, depending on how they are used.\n\nsynopsis\n--------\n\n``` js\n  var cradle = require('cradle');\n  var db = new(cradle.Connection)().database('starwars');\n\n  db.get('vader', function (err, doc) {\n      doc.name; // 'Darth Vader'\n      assert.equal(doc.force, 'dark');\n  });\n\n  db.save('skywalker', {\n      force: 'light',\n      name: 'Luke Skywalker'\n  }, function (err, res) {\n      if (err) {\n          // Handle error\n      } else {\n          // Handle success\n      }\n  });\n```\n\ninstallation\n------------\n\n``` bash\n  $ npm install cradle\n```\n\nAPI\n---\n\nCradle's API builds right on top of Node's asynch API. Every asynch method takes a callback as its last argument. The return value is an `event.EventEmitter`, so listeners can also be optionally added.\n\n### Opening a connection ###\n\n``` js\n  new(cradle.Connection)('http://living-room.couch', 5984, {\n      cache: true,\n      raw: false,\n      forceSave: true,\n      request: {\n        //Pass through configuration to `request` library for all requests on this connection.\n      }\n  });\n```\n\n_Defaults to `127.0.0.1:5984`_\n\nNote that you can also use `cradle.setup` to set a global configuration:\n\n``` js\n  cradle.setup({\n    host: 'living-room.couch',\n    cache: true,\n    raw: false,\n    forceSave: true\n  });\n\n  var c = new(cradle.Connection),\n     cc = new(cradle.Connection)('173.45.66.92');\n```\n\n### creating a database ###\n\n``` js\n  var db = c.database('starwars');\n  db.create(function(err){\n    /* do something if there's an error */\n  });\n```\n\n#### checking for database existence ####\n\nYou can check if a database exists with the `exists()` method.\n\n``` js\n  db.exists(function (err, exists) {\n    if (err) {\n      console.log('error', err);\n    } else if (exists) {\n      console.log('the force is with you.');\n    } else {\n      console.log('database does not exists.');\n      db.create();\n      /* populate design documents */\n    }\n  });\n```\n\n### destroy a database ###\n\n``` js\n  db.destroy(cb);\n```\n\n### fetching a document _(GET)_ ###\n\n``` js\n  db.get('vader', function (err, doc) {\n      console.log(doc);\n  });\n```\n\n> If you want to get a specific revision for that document, you can pass it as the 2nd parameter to `get()`.\n\nCradle is also able to fetch multiple documents if you have a list of ids, just pass an array to `get`:\n\n``` js\n  db.get(['luke', 'vader'], function (err, doc) { ... });\n```\n\n### Querying a view ###\n\n``` js\n  db.view('characters/all', function (err, res) {\n      res.forEach(function (row) {\n          console.log(\"%s is on the %s side of the force.\", row.name, row.force);\n      });\n  });\n```\n\nYou can access the key and value of the response with forEach using two parameters. An optional third parameter will return the id like this example.\n\n``` js\n  db.view('characters/all', function (err, res) {\n      res.forEach(function (key, row, id) {\n          console.log(\"%s has view key %s.\", row.name, key);\n      });\n  });\n```\n\nTo use [View Generation Options](http://wiki.apache.org/couchdb/HTTP_view_API#View_Generation_Options) you can use the view Method with three parameters (viewname, options, callback):\n\n``` js\n  db.view('characters/all', {group: true, reduce: true} , function (err, res) {\n      res.forEach(function (row) {\n          console.log(\"%s is on the %s side of the force.\", row.name, row.force);\n      });\n  });\n```\n\n#### Querying a row with a specific key ####\nLets suppose that you have a design document that you've created:\n\n``` js\n  db.save('_design/user', {\n    views: {\n      byUsername: {\n        map: 'function (doc) { if (doc.resource === \"User\") { emit(doc.username, doc) } }'\n      }\n    }\n  });\n```\n\nIn CouchDB you could query this view directly by making an HTTP request to:\n\n```\n  /_design/user/_view/byUsername/?key=\"luke\"\n```\n\nIn `cradle` you can make this same query by using the `.view()` database function:\n\n``` js\n  db.view('user/byUsername', { key: 'luke' }, function (err, doc) {\n      console.dir(doc);\n  });\n```\n\n#### Querying a view with an array key\n\nSay you create view for cars that has an array key with make and model\n``` js\ndb.save('_design/cars', {\n  views: {\n    byMakeAndModel: {\n      map: function (doc) {\n        if (doc.resource === 'Car' && doc.make && doc.model) {\n          var key = [doc.make, doc.model]\n          emit(key, doc)\n        }\n      }\n    }\n  }\n})\n```\nIf you want all the cars made by *Ford* with a model name between *Rav4* and later (alphabetically sorted).\nIn CouchDB you could query this view directly by making an HTTP request to:\n```\n  /_design/cars/_view/byMakeAndModel/?startkey=[\"Ford\"]&endkey=[\"Ford\", \"\\u9999\"]\n```\n\nIn `cradle` you can make this same query by using the `.view()` database function with `startkey` and `endkey` options.\n\n``` js\nvar util = require('util')\nvar opts = {\n  startkey: ['Ford'],\n  endkey: ['Ford', '\\u9999']\n}\ndb.view('cars/', opts, function (err, docs) {\n  if (err) {\n    util.error(err)\n    return\n  }\n  util.debug(docs)\n});\n```\n In the options object you can also optionally specify whether or not to `group` and `reduce` the output. In this example `reduce` must be false since there is no reduce function defined for the `cars/byMakeAndModel`. With grouping and reducing the options object would look like:\n``` js\nvar opts = {\n  startkey: ['Ford'],\n  endkey: ['Ford', '\\u9999'],\n  group: true,\n  reduce: true\n}\n```\n\n### creating/updating documents ###\n\nIn general, document creation is done with the `save()` method, while updating is done with `merge()`.\n\n#### creating with an id _(PUT)_ ####\n\n``` js\n  db.save('vader', {\n      name: 'darth', force: 'dark'\n  }, function (err, res) {\n      // Handle response\n  });\n```\n\n#### creating without an id _(POST)_ ####\n\n``` js\n  db.save({\n      force: 'dark', name: 'Darth'\n  }, function (err, res) {\n      // Handle response\n  });\n```\n\n#### updating an existing document with the revision ####\n\n``` js\n  db.save('luke', '1-94B6F82', {\n      force: 'dark', name: 'Luke'\n  }, function (err, res) {\n      // Handle response\n  });\n```\n\nNote that when saving a document this way, CouchDB overwrites the existing document with the new one. If you want to update only certain fields of the document, you have to fetch it first (with `get`), make your changes, then resave the modified document with the above method.\n\nIf you only want to update one or more attributes, and leave the others untouched, you can use the `merge()` method:\n\n``` js\n  db.merge('luke', {jedi: true}, function (err, res) {\n      // Luke is now a jedi,\n      // but remains on the dark side of the force.\n  });\n```\n\nNote that we didn't pass a `_rev`, this only works because we previously saved a full version of 'luke', and the `cache` option is enabled.\n\n#### bulk insertion ####\n\nIf you want to insert more than one document at a time, for performance reasons, you can pass an array to `save()`:\n\n``` js\n  db.save([\n      { name: 'Yoda' },\n      { name: 'Han Solo' },\n      { name: 'Leia' }\n  ], function (err, res) {\n      // Handle response\n  });\n```\n\n#### creating views ####\n\nHere we create a design document named 'characters', with two views: 'all' and 'darkside'.\n\n``` js\n  db.save('_design/characters', {\n      all: {\n          map: function (doc) {\n              if (doc.name) emit(doc.name, doc);\n          }\n      },\n      darkside: {\n          map: function (doc) {\n              if (doc.name && doc.force == 'dark') {\n                  emit(null, doc);\n              }\n          }\n      }\n  });\n```\n\nThese views can later be queried with `db.view('characters/all')`, for example.\n\nHere we create a temporary view. WARNING: do not use this in production as it is\nextremely slow (use it to test views).\n\n``` js\n  db.temporaryView({\n      map: function (doc) {\n        if (doc.color) emit(doc._id, doc);\n      }\n    }, function (err, res) {\n      if (err) console.log(err);\n      console.log(res);\n  });\n```\nNote: If you must use [View Generation Options](http://wiki.apache.org/couchdb/HTTP_view_API#View_Generation_Options) on your temporary view you can use the three parameter version of the temporaryView() Method - similar to the one described above.\n\n### creating validation ###\n\nwhen saving a design document, cradle guesses you want to create a view, mention views explicitly to work around this.\n\n``` js\n  db.save('_design/laws', {\n    views: {},\n    validate_doc_update:\n      function (newDoc, oldDoc, usrCtx) {\n        if (! /^(light|dark|neutral)$/.test(newDoc.force))\n          throw({forbidden: {error: \"invalid value\", reason: \"force must be dark, light, or neutral\"}})\n      }\n    }\n  });\n```\n\n### removing documents _(DELETE)_ ###\n\nTo remove a document, you call the `remove()` method, passing the latest document revision.\n\n``` js\n  db.remove('luke', '1-94B6F82', function (err, res) {\n      // Handle response\n  });\n```\n\nIf `remove` is called without a revision, and the document was recently fetched from the database, it will attempt to use the cached document's revision, providing caching is enabled.\n\n### update handlers ###\n\nUpdate handlers can be used by calling the `update()` method, specifying the update handler name, and optionally the document id, the query object and the document body object. Only the update handler name is a required function parameter. Note that CouchDB is able to parse query options only if the URI-encoded length is less than 8197 characters. Use the body parameter for larger objects.\n\n``` js\n  db.update('my_designdoc/update_handler_name', 'luke', undefined, { my_param: false }, function (err, res) {\n      // Handle the response, specified by the update handler\n  });\n```\n\nConnecting with authentication and SSL\n--------------------------------------\n\n``` js\n  var connection = new(cradle.Connection)('https://couch.io', 443, {\n      auth: { username: 'john', password: 'fha82l' }\n  });\n```\n\nor providing a self signed CA certificate\n\n``` js\n  var connection = new(cradle.Connection)('https://couch.io', 443, {\n      auth: { username: 'john', password: 'fha82l' },\n      ca: fs.readFileSync('path_to_self_signed_ca.crt')\n  });\n```\n\nor\n\n``` js\n  var connection = new(cradle.Connection)('couch.io', 443, {\n      secure: true,\n      auth: { username: 'john', password: 'fha82l' }\n  });\n```\n\nRetry on Connection Issues\n--------------------------\n\nFor a unreliable connection, you can have non-streaming queries automatically retry:\n\n``` js\n  var connection = new(cradle.Connection)('couch.io', 443, {\n      retries: 3,\n      retryTimeout: 30 * 1000\n  });\n```\n\nChanges API\n-----------\n\nFor a one-time `_changes` query, simply call `db.changes` with a callback:\n\n``` js\n  db.changes(function (err, list) {\n      list.forEach(function (change) { console.log(change) });\n  });\n```\n\nOr if you want to see changes since a specific sequence number:\n\n``` js\n  db.changes({ since: 42 }, function (err, list) {\n      ...\n  });\n```\n\nThe callback will receive the list of changes as an *Array*. If you want to include\nthe affected documents, simply pass `include_docs: true` in the options.\n\n### Streaming #\n\nYou can also *stream* changes, by calling `db.changes` without the callback. This API uses the **excellent** [follow][0] library from [IrisCouch][1]:\n\n``` js\n  var feed = db.changes({ since: 42 });\n\n  feed.on('change', function (change) {\n      console.log(change);\n  });\n```\n\nIn this case, it returns an instance of `follow.Feed`, which behaves very similarly to node's `EventEmitter` API. For full documentation on the options available to you when monitoring CouchDB with `.changes()` see the [follow documentation][0].\n\nAttachments\n-----------\nCradle supports writing, reading, and removing attachments. The read and write operations can be either buffered or streaming\n## Writing ##\nYou can buffer the entire attachment body and send it all at once as a single request. The callback function will fire after the attachment upload is complete or an error occurs\n\n**Syntax**\n```js\ndb.saveAttachment(idData, attachmentData, callbackFunction)\n```\n**Example**\nSay you want to save a text document as an attachment with the name 'fooAttachment.txt' and the content 'Foo document text'\n``` js\nvar doc = <some existing document>\nvar id = doc._id\nvar rev = doc._rev\nvar idAndRevData = {\n  id: id,\n  rev: rev\n}\nvar attachmentData = {\n  name: 'fooAttachment.txt',\n  'Content-Type': 'text/plain',\n  body: 'Foo document text'\n}\ndb.saveAttachment(idAndRevData, attachmentData, function (err, reply) {\n  if (err) {\n    console.dir(err)\n    return\n  }\n  console.dir(reply)\n})\n```\n\n\n### Streaming ###\nYou can use a read stream to upload the attachment body rather than buffering the entire body first. The callback function will fire after the streaming upload completes or an error occurs\n\n**Syntax**\n```js\nvar doc = savedDoc // <some saved couchdb document which has an attachment>\nvar id = doc._id\nvar rev = doc._rev\nvar idAndRevData = {\n  id: id,\n  rev: rev\n}\nvar attachmentData = {\n  name: attachmentName               // something like 'foo.txt'\n  'Content-Type': attachmentMimeType // something like 'text/plain', 'application/pdf', etc.\n  body: rawAttachmentBody            // something like 'foo document body text'\n}\nvar readStream = fs.createReadStream('/path/to/file/')\nvar writeStream  = db.saveAttachment(idData, attachmentData, callbackFunction)\nreadStream.pipe(writeStream)\n```\nWhen the streaming upload is complete the callback function will fire\n\n\n**Example**\nAttach a pdf file with the name 'bar.pdf' located at path './data/bar.pdf' to an existing document\n\n```js\nvar path = require('path')\nvar fs = require('fs')\n// this document should already be saved in the couchdb database\nvar doc = {\n  _id: 'fooDocumentID',\n  _rev: 'fooDocumentRev'\n}\nvar idData = {\n  id: doc._id,\n  rev: doc._rev\n}\nvar filename = 'bar.pdf' // this is the filename that will be used in couchdb. It can be different from your source filename if desired\nvar filePath = path.join(__dirname, 'data', 'bar.pdf')\nvar readStream = fs.createReadStream\n// note that there is no body field here since we are streaming the upload\nvar attachmentData = {\n  name: 'fooAttachment.txt',\n  'Content-Type': 'text/plain'\n}\ndb.saveAttachment(idData, attachmentData, function (err, reply) {\n  if (err) {\n    console.dir(err)\n    return\n  }\n  console.dir(reply)\n}, readStream)\n```\n\n\n## Reading ##\n\n\n### Buffered\nYou can buffer the entire attachment and receive it all at once. The callback function will fire after the download is complete or an error occurs. The second parameter in the callback will be the binary data of the attachment\n\n**Syntax**\n```js\ndb.getAttachment(documentID, attachmentName, callbackFunction)\n```\n**Example**\n Say you want to read back an attachment that was saved with the name 'foo.txt'\n```js\nvar doc = <some saved document that has an attachment with name *foo.txt*>\nvar id = doc._id\nvar attachmentName = 'foo.txt'\ndb.getAttachment(id, attachmentName, function (err, reply) {\n  if (err) {\n    console.dir(err)\n    return\n  }\n  console.dir(reply)\n})\n```\n\n### Streaming\nYou can stream the attachment as well. If the attachment is large it can be useful to stream it to limit memory consumption. The callback function will fire once the download stream is complete. Note that there is only a single error parameter passed to the callback function. The error is null is no errors occured or an error object if there was an error downloading the attachment. There is no second parameter containing the attachment data like in the buffered read example\n\n**Syntax**\n```js\nvar readStream = db.getAttachment(documentID, attachmentName, callbackFunction)\n```\n\n**Example**\n Say you want to read back an attachment that was saved with the name 'foo.txt'. However the attachment foo.txt is very large so you want to stream it to disk rather than buffer the entire file into memory\n```js\nvar doc = <some saved document that has an attachment with name *foo.txt*>\nvar id = doc._id\nvar attachmentName = 'foo.txt'\nvar downloadPath = path.join(__dirname, 'foo_download.txt')\nvar writeStream = fs.createWriteStream(downloadPath)\nvar readStream = db.getAttachment('piped-attachment', 'foo.txt', function (err) { // note no second reply paramter\n  if (err) {\n    console.dir(err)\n    return\n  }\n  console.dir('download completed and written to file on disk at path', downloadPath)\n})\nreadStream.pipe(writeStream)\n```\n## Removing\nYou can remove uploaded attachments with a _id and an attachment name\n\n**Syntax**\n```js\ndb.removeAttachment(documentID, attachmentName, callbackFunction)\n```\n**Example**\n Say you want to remove an attachment that was saved with the name 'foo.txt'\n```js\nvar doc = <some saved document that has an attachment with name *foo.txt*>\nvar id = doc._id\nvar attachmentName = 'foo.txt'\ndb.removeAttachment(id, attachmentName, function (err, reply) {\n  if (err) {\n    console.dir(err)\n    return\n  }\n  console.dir(reply)\n})\n```\nOther API methods\n-----------------\n\n### CouchDB Server level ###\n\n``` js\n  new(cradle.Connection)().*\n```\n\n- `databases()`: Get list of databases\n- `config()`: Get server config\n- `info()`: Get server information\n- `stats()`: Statistics overview\n- `activeTasks()`: Get list of currently active tasks\n- `uuids(count)`: Get _count_ list of UUIDs\n- `replicate(options)`: Replicate a database.\n\n### database level ###\n\n``` js\n  new(cradle.Connection)().database('starwars').*\n```\n\n- `info()`: Database information\n- `all()`: Get all documents\n- `compact()`: Compact database\n- `viewCleanup()`: Cleanup old view data\n- `replicate(target, options)`: Replicate this database to `target`.\n\n### cache API ###\n\nWhen cache is enabled (default is true), a document is loaded into cradle's cache when it's retrieved or saved. In the event you wish to keep caching enabled, but invalidate specific items - such as those which may have been updated elsewhere. You can use the API below.\n\n**HAS**\n```js\ndb.cache.has('docid');  //returns true if exists, false if not\n```\n\n**GET**\n```js\ndb.cache.get('docid');  //returns the document from the cache\n```\n\n**PURGE**\n```js\ndb.cache.purge('docid');  //remove this item from the cache\n```\n\n**SAVE**\n```js\ndb.cache.save('docid', doc);  //saves the provided document into the cache\n```\n\n**Example**\nThis is an example from an application using express to receive a post request when a documentid has been updated.\n```js\napp.post('/dbcache/:id', function (req, res) {\n  if(db.cache.has(req.params.id)) {\n      db.cache.purge(req.params.id);\n    res.send({ status:\"ok\", id: req.params.id, action: 'deleted'});\n  }\n  else {\n    res.send({ status:\"not found\", id: req.params.id, action: \"none\"}, 404);\n  }\n});\n```\n\n\n[0]: https://github.com/iriscouch/follow\n[1]: http://iriscouch.com\n\n\nTesting\n-------\n\nAfter cloning the repo and installing all dependencies (using `npm install`) you can run all tests using [vows](http://vowsjs.org):\n\n```\n$ node test/helpers/seed.js\n$ vows --spec\n```\n","readmeFilename":"README.md","keywords":["couchdb","database","couch"],"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Maciej Malecki","email":"maciej@nodejitsu.com"}],"homepage":"https://github.com/flatiron/cradle#readme","repository":{"type":"git","url":"git+https://github.com/flatiron/cradle.git"},"bugs":{"url":"https://github.com/flatiron/cradle/issues"},"license":"MIT"}