{"_id":"chainit","_rev":"219587","name":"chainit","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","dist-tags":{"latest":"2.1.1"},"maintainers":[{"name":"vvo","email":""}],"time":{"modified":"2023-03-24T09:32:54.000Z","created":"2013-10-20T20:36:36.516Z","2.1.1":"2014-08-11T02:06:46.382Z","2.1.0":"2014-04-28T22:01:32.430Z","2.0.4":"2014-04-25T17:04:43.871Z","2.0.3":"2014-04-18T16:16:28.952Z","2.0.2-backcompat":"2014-03-18T10:45:13.757Z","2.0.1-backcompat":"2014-03-18T10:44:43.893Z","2.0.0-backcompat":"2014-03-18T10:43:02.334Z","1.3.1":"2014-03-13T23:22:01.445Z","1.3.0":"2014-03-13T22:53:40.810Z","1.2.0":"2014-03-05T22:20:13.419Z","1.1.2":"2013-12-29T18:40:19.740Z","1.1.1":"2013-12-27T17:45:06.707Z","1.0.1":"2013-12-01T17:06:38.566Z","1.0.0":"2013-12-01T16:59:40.756Z","0.0.4":"2013-11-13T18:19:58.906Z","0.0.3":"2013-11-08T01:12:01.973Z","0.0.1":"2013-10-20T20:36:36.516Z"},"users":{},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"versions":{"2.1.1":{"name":"chainit","version":"2.1.1","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.18.2","zuul":"~1.6.3"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"gitHead":"32369c94cfbd7affbeb31662efba3c5a053138a1","bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@2.1.1","_shasum":"e5345d9c071d473e73274c88aea66c91513628c1","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"christian-bromann","email":"contact@christian-bromann.com"},"maintainers":[{"name":"vvo","email":""}],"dist":{"shasum":"e5345d9c071d473e73274c88aea66c91513628c1","size":7237,"noattachment":false,"key":"/chainit/-/chainit-2.1.1.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-2.1.1.tgz"},"_cnpmcore_publish_time":"2021-12-19T15:15:37.778Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1407722806382,"_cnpm_publish_time":1407722806382},"2.1.0":{"name":"chainit","version":"2.1.0","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.18.2","zuul":"~1.6.3"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@2.1.0","_shasum":"3f9024d3bb3ca1a940c8c6fcfc79dde1ef357927","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"christian-bromann","email":"contact@christian-bromann.com"},"maintainers":[{"name":"vvo","email":""}],"dist":{"shasum":"3f9024d3bb3ca1a940c8c6fcfc79dde1ef357927","size":7260,"noattachment":false,"key":"/chainit/-/chainit-2.1.0.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-2.1.0.tgz"},"_cnpmcore_publish_time":"2021-12-19T15:15:36.901Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1398722492430,"_cnpm_publish_time":1398722492430},"2.0.4":{"name":"chainit","version":"2.0.4","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.18.2","zuul":"~1.6.3"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@2.0.4","_shasum":"efddf5c195955354f5d62d8ab55bcad561ea90a5","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"christian-bromann","email":"contact@christian-bromann.com"},"maintainers":[{"name":"vvo","email":""}],"dist":{"shasum":"efddf5c195955354f5d62d8ab55bcad561ea90a5","size":6947,"noattachment":false,"key":"/chainit/-/chainit-2.0.4.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-2.0.4.tgz"},"_cnpmcore_publish_time":"2021-12-19T15:15:36.588Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1398445483871,"_cnpm_publish_time":1398445483871},"2.0.3":{"name":"chainit","version":"2.0.3","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.18.2","zuul":"~1.6.3"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@2.0.3","_shasum":"6d61d878712a1d0a23b1b3682992d5644948ba6e","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"christian-bromann","email":"contact@christian-bromann.com"},"maintainers":[{"name":"vvo","email":""}],"dist":{"shasum":"6d61d878712a1d0a23b1b3682992d5644948ba6e","size":6891,"noattachment":false,"key":"/chainit/-/chainit-2.0.3.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-2.0.3.tgz"},"_cnpmcore_publish_time":"2021-12-19T15:15:35.720Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1397837788952,"_cnpm_publish_time":1397837788952},"2.0.2-backcompat":{"name":"chainit","version":"2.0.2-backcompat","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.17.1","zuul":"~1.5.4"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@2.0.2-backcompat","dist":{"shasum":"bd1d4a2d618c319a44ae29b987a0399960a096ed","size":7059,"noattachment":false,"key":"/chainit/-/chainit-2.0.2-backcompat.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-2.0.2-backcompat.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:34.836Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1395139513757,"_cnpm_publish_time":1395139513757},"2.0.1-backcompat":{"name":"chainit","version":"2.0.1-backcompat","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.17.1","zuul":"~1.5.4"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@2.0.1-backcompat","dist":{"shasum":"7553a2ccabca4aa5ae859467f2f73edff34f61a2","size":7058,"noattachment":false,"key":"/chainit/-/chainit-2.0.1-backcompat.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-2.0.1-backcompat.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:33.946Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1395139483893,"_cnpm_publish_time":1395139483893},"2.0.0-backcompat":{"name":"chainit","version":"2.0.0-backcompat","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.17.1","zuul":"~1.5.4"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@2.0.0-backcompat","dist":{"shasum":"dc0c9d8f23ea964d2c5ff0cf98da7f73c66e7d34","size":7060,"noattachment":false,"key":"/chainit/-/chainit-2.0.0-backcompat.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-2.0.0-backcompat.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:33.077Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1395139382334,"_cnpm_publish_time":1395139382334},"1.3.1":{"name":"chainit","version":"1.3.1","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.17.1","zuul":"~1.5.4"},"dependencies":{"queue":"~2.2.0"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@1.3.1","dist":{"shasum":"5351cebcbdb1a523db5014a0e243081a858db0e4","size":7528,"noattachment":false,"key":"/chainit/-/chainit-1.3.1.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-1.3.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:32.193Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1394752921445,"_cnpm_publish_time":1394752921445},"1.3.0":{"name":"chainit","version":"1.3.0","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.17.1","zuul":"~1.5.4"},"dependencies":{"queue":"~2.2.0"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@1.3.0","dist":{"shasum":"3e4d93124b8e1ce92972227b6118e250bff79f82","size":7527,"noattachment":false,"key":"/chainit/-/chainit-1.3.0.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-1.3.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:31.323Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1394751220810,"_cnpm_publish_time":1394751220810},"1.2.0":{"name":"chainit","version":"1.2.0","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.17.1","zuul":"~1.5.4"},"dependencies":{"queue":"~2.2.0"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"_id":"chainit@1.2.0","dist":{"shasum":"f10a36141453354aa745ed073a95461a3b154543","size":7153,"noattachment":false,"key":"/chainit/-/chainit-1.2.0.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-1.2.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:30.461Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1394058013419,"_cnpm_publish_time":1394058013419},"1.1.2":{"name":"chainit","version":"1.1.2","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.16.2","zuul":"~1.0.2"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@1.1.2","dist":{"shasum":"9449dd31951bf08d92a0c9d82c28980c1ecfc485","size":6594,"noattachment":false,"key":"/chainit/-/chainit-1.1.2.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-1.1.2.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:29.576Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1388342419740,"_cnpm_publish_time":1388342419740},"1.1.1":{"name":"chainit","version":"1.1.1","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.16.2","zuul":"~1.0.2"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@1.1.1","dist":{"shasum":"916f88bb103fbc92cc2bf748c521cacbd81b8ed6","size":6567,"noattachment":false,"key":"/chainit/-/chainit-1.1.1.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-1.1.1.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:28.703Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1388166306707,"_cnpm_publish_time":1388166306707},"1.0.1":{"name":"chainit","version":"1.0.1","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.14.0","zuul":"~1.0.2"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@1.0.1","dist":{"shasum":"1a6dd1d778cde7a5aa59220c4286d97b600de74e","size":6003,"noattachment":false,"key":"/chainit/-/chainit-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-1.0.1.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:27.613Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1385917598566,"_cnpm_publish_time":1385917598566},"1.0.0":{"name":"chainit","version":"1.0.0","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.14.0","zuul":"~1.0.2"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"homepage":"https://github.com/vvo/chainit","_id":"chainit@1.0.0","dist":{"shasum":"a74a76ea4923478c42ae3e13b8baaf7f52983c95","size":5950,"noattachment":false,"key":"/chainit/-/chainit-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:26.718Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1385917180756,"_cnpm_publish_time":1385917180756},"0.0.4":{"name":"chainit","version":"0.0.4","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"zuul -- test/chain.js"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.14.0","zuul":"~1.0.2"},"dependencies":{"queue":"~1.0.2"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"repository":{"type":"git","url":"git://github.com/vvo/chainit.git"},"bugs":{"url":"https://github.com/vvo/chainit/issues"},"_id":"chainit@0.0.4","dist":{"shasum":"98a81ae27ce80bc45cbb0c1080795e29f6f7ef6e","size":5802,"noattachment":false,"key":"/chainit/-/chainit-0.0.4.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-0.0.4.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:25.846Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1384366798906,"_cnpm_publish_time":1384366798906},"0.0.3":{"name":"chainit","version":"0.0.3","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples","test":"test"},"scripts":{"test":"mocha"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.13.0"},"dependencies":{"queue":"~1.0.1"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"_id":"chainit@0.0.3","dist":{"shasum":"3fdd77c2d6affa69040004395d78d9fe8447baf8","size":4205,"noattachment":false,"key":"/chainit/-/chainit-0.0.3.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-0.0.3.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:24.974Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1383873121973,"_cnpm_publish_time":1383873121973},"0.0.1":{"name":"chainit","version":"0.0.1","description":"Turn an asynchronous JavaScript api into an asynchronous chainable JavaScript api.","main":"index.js","directories":{"example":"examples","test":"test"},"scripts":{"test":"mocha"},"author":{"name":"Vincent Voyer","email":"vincent@zeroload.net"},"license":"MIT/X11","devDependencies":{"mocha":"~1.13.0"},"dependencies":{"queue":"~1.0.1"},"keywords":["chain","async","queue","flow control","chainable","chainify","chainit","chain api"],"_id":"chainit@0.0.1","dist":{"shasum":"e922f321cf926fd194dd1a7482c3342aae3d664e","size":3157,"noattachment":false,"key":"/chainit/-/chainit-0.0.1.tgz","tarball":"http://name.csiicloud.com:7001/chainit/download/chainit-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"vvo","email":"vincent.voyer@gmail.com"},"maintainers":[{"name":"vvo","email":""}],"_cnpmcore_publish_time":"2021-12-19T15:15:24.105Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1382301396516,"_cnpm_publish_time":1382301396516}},"readme":"# chainit3\n\nTurn an asynchronous JavaScript api into an asynchronous\n[chainable](http://en.wikipedia.org/wiki/Method_chaining) JavaScript api.\n\nThis is a fork of [chainit](https://github.com/vvo/chainit), with more\nwork into getting a well-defined behavior of the transformation.\n\n\n## usage\n\n```js\nfunction MyApi() {}\nMyApi.prototype.method1 = function(cb) {cb()}\nMyApi.prototype.method2 = function(cb) {cb()}\n\nvar chainit = require('chainit');\nvar MyChainApi = chainit(MyApi);\nvar obj = new MyChainApi();\nobj\n  .method1()                      // 1st call\n  .method2()                      // 2nd call\n  .method1(function(/* args */) { // 3rd call\n    this.method1();               // 4th call\n  })\n  .method2();                     // 5th call\n```\n\n\n## Adding or overriding methods\n\nAdding and overriding methods works at both prototype level and instance level.\n\nYou must use `chainit.add(chain, methodName, method)`, since direct assignations\nwon't wrap your method properly.\n\n```js\nfunction MyApi() {}\nMyApi.prototype.method1 = function(cb) {cb()}\nMyApi.prototype.method2 = function(cb) {cb()}\n\nvar chainit = require('chainit');\nvar MyChainApi = chainit(MyApi);\n\nvar obj = new MyChainApi();\n\n// override instance method\nchainit.add(obj, 'method1', function(cb) {\n  cb()\n});\n\nobj\n  .method1() // calls the newly added method1\n  .method2();\n\n// revert original method\nchainit.add(obj, 'method1', MyApi.prototype.method1);\n\n// override prototype method\nchainit.add(MyChainApi, 'method1', function(cb) {\n  cb()\n});\n\nvar obj2 = new MyChainApi();\n\nobj2.method1(); // calls the newly chained prototype `method1`\n```\n\n## Like a state machine\n\nIt is also possible to have a custom function called immediately, in addition\nto the function that is queued:\n\n```js\nchainit.add(obj, 'method1', function queued1(sub, cb) {\n  //... the actual method\n}, function now1(sub) {\n  this.chainState = { one: true };\n});\nchainit.add(obj, 'method2', function queued2(var1, var2, cb) {\n\n}, function now2(var1, var2) {\n  if (!this.chainState || !this.chainState.one) throw new Error(\"method2 must be called after method1\");\n  this.chainState.one = false;\n});\n\n// this works\nobj.method1(a, b).method2(a, b) // ok\nobj.method1(a, b, function() {\n  this.method2(a, b); // ok\n  this.method2(a, b); // not allowed by that simple state machine\n});\n\n```\n\nThe first function is pushed to the queue, the second function is called\nimmediately.\n\nThe second function can set `this.chainState = someObject` and the queued\nfunction will be able to access that object.\n\n`this.chainState` reference is copied to the next queued (and immediate if any)\nfunctions: this behavior allows queued functions to get information about\nwhich functions were queued before or after them.\n\n\n## error handling\n\nUpon error, execution is stopped and the nearest callback is called,\nor the error is thrown:\n\n```js\nobj\n  .method1()\n  .methodError()\n  .notactuallycalled(function(err) {\n    // the error that happened in methodError\n    // but the method \"notactuallycalled\" is not called !\n    console.error(err);\n  });\n```\n\nUncaught errors are also caught and handled the same way - which\nadds some safety to the original API.\n\n\n## variable length arguments\n\nMethods that have a variable number of arguments require special handling.\nIt is advised to define those methods with the smallest number of required\narguments:\n\n```js\nfunction(uri, cb) {\n  var opts = {};\n  if (typeof cb != \"function\") {\n    opts = cb;\n    cb = arguments[2];\n  }\n  // ...\n}\n```\n\nThis automatically excludes the case where the function can accept\n(uri, myfun, cb) with myfun as an optional argument.\nThis is actually a good thing because it prevents undefined behavior.\n\n\n## features\n\nFeatures:\n\n* supports async apis\n* supports (crazy) nested calls\n* supports static and prototype methods\n* preserves nested calls order\n* preserves context in cb()\n* preserves cb(args)\n* stops execution on error\n* propagates error to the nearest callback\n* throws error if no callback can handle it\n* supports method(fun, cb) signatures\n* supports process.nextTick(cb)\n* supports setTimeout(cb)\n* supports methods redifinition\n* supports adding new methods\n* fully tested! local: `npm install -g mocha && mocha`, saucelabs: `npm test`\n\n\n## mixing async/sync apis\n\nThere is no easy way to mix sync/async chainable\napis because there is no way to differenciate sync/async calls.\n\n```js\nobj\n  .asyncMethod()\n  .syncMethod()\n```\n\nWe cannot know that syncMethod is synchronous and that\nwe do not\nneed to wait for a callback to be called to continue.\n\nEither your api is fully asynchronous and every method\ntakes a callback.\n\nEither your api is fully synchronous.\nIf you want synchronous support, make a pull request\nadding `chainit.sync(Constructor)`.\n\n\n## credits\n\nThis module is using [jessetane/queue](https://github.com/jessetane/queue).\n\nA chainable api is queueing methods and reordering calls, so we use a queue.\n\nThis module was built to replace the chainable api from\n[webdriverjs](https://github.com/camme/webdriverjs).\n\nIt is now used by more modules and is maintained with general use in mind now.\n","_attachments":{},"homepage":"https://github.com/vvo/chainit","bugs":{"url":"https://github.com/vvo/chainit/issues"},"license":"MIT/X11"}