{"_id":"sync","_rev":"137-e9323ef8deb3f7626d33e5032503ce92","name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","dist-tags":{"latest":"0.2.5"},"versions":{"0.0.1":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.0.1","url":"http://github.com/octave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.0"},"_id":"sync@0.0.1","_engineSupported":true,"_npmVersion":"0.2.15","_nodeVersion":"v0.4.1","directories":{"lib":"./lib"},"modules":{"sync.js":"lib/sync.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"f305289800eb9bf6f7a8eeaee71705e96a0d36d6","tarball":"https://registry.npmjs.org/sync/-/sync-0.0.1.tgz","integrity":"sha512-EDsSIxtiP3Q2EUGbf6ajJm286WCj4VADx7jtRRriT97SgfLxxg4e9DHFcZEbhiDO6e3vy/9XeHyyort447W/2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID0L+Hb+srQ1qaPL8o85RznlYGAADR1sQ2AhTQMWgXFNAiAK3MB2egduz7+3fdW085aQs8PdB5El9mMfbduJhwR/IQ=="}]}},"0.1.0":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.0","url":"http://github.com/octave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.0"},"_id":"sync@0.1.0","_engineSupported":true,"_npmVersion":"0.2.15","_nodeVersion":"v0.4.2","directories":{"lib":"./lib"},"modules":{"sync.js":"lib/sync.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"b936331080a9176bf66e02e9e35129a43a668410","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.0.tgz","integrity":"sha512-slFE817qsNmczID1wUkHaTEO0NE8UVoFFz2Pi8+X1mgOT6u82oJ9PHeQdTtCdx5MFuewcoRKg8AqwqWg3igvOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBiiA3SlPsFK2DhIPVnsxJIfltXVOTwvH6SpQyamT+fgIgUBcdNY2Psk64xI+F72G60R05vuv25ZJRL0VjoP0478I="}]}},"0.1.1":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.1","url":"http://github.com/octave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.0"},"_id":"sync@0.1.1","_engineSupported":true,"_npmVersion":"0.2.15","_nodeVersion":"v0.4.2","directories":{"lib":"./lib"},"modules":{"sync.js":"lib/sync.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"5ed4ab39eca7f88302652579f62c1611e126d836","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.1.tgz","integrity":"sha512-23AWyrST7yE5CAmLZqo2i2MpHFRHz6aQy6EctConFBJRX98T/762yGL2szagJmCoI9rxoA+ShY+ehOlYJcHKIw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHU1R4I6KqvynCR5PRSgfc0Claj4Hn3wxTpU6oBiIhZgIgeQTuDkQ4dqKBWBYAnyQKBL5ZXwyJK8f38mh8evqv+uE="}]}},"0.1.3":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.3","url":"http://github.com/octave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.0"},"_id":"sync@0.1.3","_engineSupported":true,"_npmVersion":"0.2.15","_nodeVersion":"v0.4.2","directories":{"lib":"./lib"},"modules":{"sync.js":"lib/sync.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"ddfebdc6b86f4f1afc5d44be6b94b7ba9478939f","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.3.tgz","integrity":"sha512-VjjFt9dswGQiOneIyc3blySrioSJC7QDlrnljySnv+Y5Ru0mQxF1uxchL0jnmfJHHGcr9O6wO1gmYr5GlT+zbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAYSLDTUe6lmXCnUeqLjJdOOC3Hi2xdd+drzPf27XUK5AiEA5rNgK5Q6M7qAEbG7yu5xYWaDWmlCfvsYBFFJPuai1rg="}]}},"0.1.4":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.4","url":"http://github.com/octave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.3"},"_id":"sync@0.1.4","_engineSupported":true,"_npmVersion":"0.2.15","_nodeVersion":"v0.4.2","directories":{"lib":"./lib"},"modules":{"sync.js":"lib/sync.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"e0ae0a3ad0233439aa47e6f1c3b74513c165e9cb","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.4.tgz","integrity":"sha512-wUK+p5W7MXJmYpwtwcdVDVsSCxY4D/ldgF8shODXLvaLXIPEq49zimoyqPNwXSsAcqr4lkfe/I7vgmyqrseAuQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZxZv836UW96brPA5zyTDx9w01QNs7FgAEQyGHBaFw2AIgW70+GLdyKW9U8XzHlt4Z6y5NdruBTgb60SrrsZZyWMw="}]}},"0.1.5":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.5","url":"http://github.com/octave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.3"},"_id":"sync@0.1.5","_engineSupported":true,"_npmVersion":"0.2.15","_nodeVersion":"v0.4.2","directories":{"lib":"./lib"},"modules":{"sync.js":"lib/sync.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"46781ff7347dfb8f5528f4845256788011cbbdd6","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.5.tgz","integrity":"sha512-VAryTfXGQSLKed4yzzHIBPE65cWVaasUmvUKmbSPpLwIcgZ5+VejiCkLNATnY2Nq9O/vKz4Y5gIRU5hUAOPtBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSO4ny9w5ys6HlfFuSB35YhKTrVUi1UisFrH9ie22fsQIgA3Vi4nkPu84PPKoqGdpicNMTzl85tBkjq3RDhZ+1bqk="}]}},"0.1.6":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.6","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.3"},"devDependencies":{},"_id":"sync@0.1.6","_engineSupported":true,"_npmVersion":"1.0.1rc9","_nodeVersion":"v0.4.5","_defaultsLoaded":true,"dist":{"shasum":"ebaf354bebca360487a1ed020df0cd4d002cf167","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.6.tgz","integrity":"sha512-kkSpuiDdUcrJfkxUAGpTqe4EEDed8N1bOvcSj+XdcJmP5sQjIl1DyPJ5LYbMkI0g+IUAj8Lj5vhdloKLj4toNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE42W5OxXVEU91/fyW8QuqBW+oMvKW9YS0f8RIXd8emtAiEA7DwyHxEMGo15q4H1O0Vo973/HdJrlQjf+V+SxlxbNe4="}]},"scripts":{},"directories":{}},"0.1.7":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.7","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.6"},"devDependencies":{},"_id":"sync@0.1.7","_engineSupported":true,"_npmVersion":"1.0.1rc9","_nodeVersion":"v0.4.5","_defaultsLoaded":true,"dist":{"shasum":"e743ba4b644f150f2b8090539b55bd06c3b53231","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.7.tgz","integrity":"sha512-DsKLOshoe2orr9YKnPbghFk2cYxqndiIyBoT6RANDhOGrBX0tN/3ApzVzHNQixVJFEfLrG+4FPlfUQER6TnROw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCDbXcPP6gJlCuobPQw+8RQ3VXIXSy+NE52z5TQ96p5AiEA3A/sHvNNnkLW/2I9N7FyeOFX2Kb3q2N8yDAekTPTfPM="}]},"scripts":{},"directories":{}},"0.1.8":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.8","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.6 < 0.6"},"_npmJsonOpts":{"file":"/Users/octave/.npm/sync/0.1.8/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"sync@0.1.8","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.26","_nodeVersion":"v0.4.5","_defaultsLoaded":true,"dist":{"shasum":"ac0fa41ef2e540813d92b17e71d4d354efe1497c","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.8.tgz","integrity":"sha512-Tv33gXhqpm6yNIECBDMzquQYOr1sDfDT9iTVPJUx0I3BMtuBOv10ZiF8esXApgNO4JNW21C86RKkVaxgu52R4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOYKO3r3apaCUlraCJqHUx5AyMA2DwCHnV5NTSgMx95gIgJSKjau9KJ/mwHVEZd2L2bmPXkfRT+0GdKvMHTyrQotU="}]},"scripts":{},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"directories":{}},"0.2.0":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.2.0","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.5.2"},"dependencies":{"fibers":">=0.6"},"_npmJsonOpts":{"file":"/Users/octave/.npm/sync/0.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"sync@0.2.0","devDependencies":{},"_engineSupported":false,"_npmVersion":"1.0.30","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"738d2f4431aaa9b6544fe39031c96230d7667154","tarball":"https://registry.npmjs.org/sync/-/sync-0.2.0.tgz","integrity":"sha512-ESb6JXF0Si8xJ46xa8It3h6tl+Us3T4lDsZYxZ5zY3nHvfU7vu8d+VREEFtdnOgQBX4fAXHV5nhiaE/apAS7LQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEGb4GkjFSE0lrtgLfag7BWW0PboUBn3U5S/PcEPszCiAiEAu8hMNSq+Rt/Y+iUXh5rMZI5qbV5+xm01LcN6u45up9M="}]},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"directories":{}},"0.2.1":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.2.1","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.5.2"},"dependencies":{"fibers":">=0.6"},"_id":"sync@0.2.1","dist":{"shasum":"89120b72efa477e9d1c0a514fe3a668fa04bc61d","tarball":"https://registry.npmjs.org/sync/-/sync-0.2.1.tgz","integrity":"sha512-NH7e+ghC1FfVHAvZsxRcOtCjc3iQwHmLYatB0voje/VjRcn2XpGP/GnJ2zLnCh+IQsfui81OfPLCDz0QwbqxWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJkCy6H6qU7ISko+siJO1dOM1aTShI8tI4r3KPqLK43gIgU9lvJOmxml4dDh7/6phNJXIrarfxyvSsA3Flt+/lEKY="}]},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"directories":{}},"0.2.2":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.2.2","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.5.2"},"dependencies":{"fibers":">=0.6"},"_id":"sync@0.2.2","dist":{"shasum":"9622bf50ab5ad779c9b39b7bd8fe7ce02fabd834","tarball":"https://registry.npmjs.org/sync/-/sync-0.2.2.tgz","integrity":"sha512-WAC8wRhyZnibTlBd+ierbHYnu4jw4VHwFtgbed75gb21axea3SxVt0H2eP3/tr9IAdAVr/lzMT23MY+5kxJ0AA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGc3kVpSCRWxr57BOK/Wkhp+8SzjnzKYrjNcKx6Vo14DAiEAjMqBgQkq66pJn7ZGqJnw5jSnEltXTOK/mUO5LKdfmFU="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"octave","email":"chinsay@gmail.com"},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"directories":{}},"0.2.3":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.2.3","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","license":"MIT","repository":{"type":"git","url":"https://github.com/ybogdanov/node-sync.git"},"engines":{"node":">=0.5.2"},"dependencies":{"fibers":">=0.6"},"bugs":{"url":"https://github.com/ybogdanov/node-sync/issues"},"homepage":"https://github.com/ybogdanov/node-sync","_id":"sync@0.2.3","dist":{"shasum":"390bc9c718eb2e87e5cb26caa75de90c6e8e9bdc","tarball":"https://registry.npmjs.org/sync/-/sync-0.2.3.tgz","integrity":"sha512-WLd2w5vWPe3yZHL7L4LrhAgdGGX33OZ4uXAsmmHHvg03PKPYC2OZukeWLfI3+Y2PC2Yiis9vbcvpIsSeVmsRfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH+U2sn0HAJwfxSoJsZ/fkqs2v8f3fBQ3I970bIPhdOZAiBqChk0kGwFcExucS2lSmz47hHNdeme96qONOnyC5ALDA=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"octave","email":"chinsay@gmail.com"},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"directories":{}},"0.2.4":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.2.4","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","license":"MIT","repository":{"type":"git","url":"https://github.com/ybogdanov/node-sync.git"},"engines":{"node":">=0.5.2"},"dependencies":{"fibers":"0.6.8"},"bugs":{"url":"https://github.com/ybogdanov/node-sync/issues"},"homepage":"https://github.com/ybogdanov/node-sync","_id":"sync@0.2.4","dist":{"shasum":"3e9dafe0d473ce7c5769a1865792fb15803bb664","tarball":"https://registry.npmjs.org/sync/-/sync-0.2.4.tgz","integrity":"sha512-wA0Ms+hTVW3DEyrY4vJY/ML8VyBBs7m5hONbfHk4AJ3Y/tLzj9QczXbOVgVBGLlDPHhBOOYJ1HcjfP+L18YjVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAKeLg70kIomzok5uPkpbZKe+i8kqFgemwVK7XQX3Z8EAiEAtbSmP8AwTofJD00KYnN2vHw91koPXhAWySWJQ4p+dXY="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"octave","email":"chinsay@gmail.com"},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"directories":{}},"0.2.5":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.2.5","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","license":"MIT","repository":{"type":"git","url":"https://github.com/ybogdanov/node-sync.git"},"engines":{"node":">=0.5.2"},"dependencies":{"fibers":">=0.6"},"bugs":{"url":"https://github.com/ybogdanov/node-sync/issues"},"homepage":"https://github.com/ybogdanov/node-sync","_id":"sync@0.2.5","dist":{"shasum":"3910bb9b66abee56542e2e70f0ce549031252df6","tarball":"https://registry.npmjs.org/sync/-/sync-0.2.5.tgz","integrity":"sha512-g7UDPo8z33h0KAr1cXDU0UzV3LTHONom/EuU7oyEgTEf4/sWR8OYzvKYwiEYqgCmMlbF8YQutoDAfw3hsDU5EQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuA5menQ9mEJ9bX5uvQPA6NCTy7Zc3wdSDhgSf2XUl9AIgOUq1FiDiQWjxSJBUY47q2F5MBkDsrq0eRpo2H3h7Zfc="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"octave","email":"chinsay@gmail.com"},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"directories":{}},"0.1.9-beta":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.9-beta","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.2.6"},"devDependencies":{},"_id":"sync@0.1.9-beta","_engineSupported":true,"_npmVersion":"1.0.1rc9","_nodeVersion":"v0.4.5","_defaultsLoaded":true,"dist":{"shasum":"77b15039ed0f491949b0bd0b3a099443a921f8f6","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.9beta.tgz","integrity":"sha512-kLgHR27n2LV/cL5uFbO5wsWj6TbEJMSi2ezwY0iLWy+MWNIeQvVyngOvI2FBcf7d8CTYu09BwaOSKrMBXnNs4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvgPD4WhviW/8C1Alm5PM44/cP7pMNjMuhSCQWlHPbgQIgMMYw8lp9nivFt0LNCYCt/5FA3jw0Jg4G8xgzpgSIvNo="}]},"scripts":{},"directories":{}},"0.1.9-beta2":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.9-beta2","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.5"},"_npmJsonOpts":{"file":"/Users/octave/.npm/sync/0.1.9beta2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"sync@0.1.9-beta2","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.26","_nodeVersion":"v0.4.5","_defaultsLoaded":true,"dist":{"shasum":"31977bea483b834f9cf0b6decf9957c7fb85a6c9","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.9beta2.tgz","integrity":"sha512-Y/jeEOpKqbLey71azvXlJv9b4voBK10HqAfIvBHZoRxkCfwZDfMpwEp21LbjidKJ6D8oKgmmg1shUc6QuQGYXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHqWi/MBtTVgsZd2WY8hzl6lwC1upgOtcvFBtOuV5WVAIgT0+ePVM+w0odxHEYssIfd4FtQIcrge9gb2DHaPwSUFg="}]},"scripts":{},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"directories":{}},"0.1.9-beta3":{"name":"sync","description":"Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.","version":"0.1.9-beta3","url":"http://github.com/0ctave/node-sync","author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"main":"lib/sync","engines":{"node":">=0.3.6"},"dependencies":{"fibers":">=0.5 < 0.6"},"_npmJsonOpts":{"file":"/Users/octave/.npm/sync/0.1.9beta3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"sync@0.1.9-beta3","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.26","_nodeVersion":"v0.4.5","_defaultsLoaded":true,"dist":{"shasum":"9bb3d7f88b5347f81dc2eca0d63fceddbc727ea4","tarball":"https://registry.npmjs.org/sync/-/sync-0.1.9beta3.tgz","integrity":"sha512-anjy3dbASYDdieQx6lbWB0X7THfNScmlhIKR04+jK+PG5+UuoJt+I/lLmhsWGVSoXfEy3BaOj7IVNDQiU4jX6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICddMgEji6wvius/0/lKaMuoNeBq0CAyzeKE0ZEvsPQ2AiBtiv/X/Dai5tXectDMe5nrSai9d/ZUB0WErCOo3CWtDw=="}]},"scripts":{},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"directories":{}}},"maintainers":[{"name":"octave","email":"chinsay@gmail.com"}],"time":{"modified":"2022-06-27T03:08:47.775Z","created":"2011-03-11T17:13:53.096Z","0.0.1":"2011-03-11T17:13:53.557Z","0.1.0":"2011-03-28T04:32:30.440Z","0.1.1":"2011-03-28T12:34:28.094Z","0.1.3":"2011-03-31T09:56:45.285Z","0.1.4":"2011-03-31T10:32:14.983Z","0.1.5":"2011-03-31T11:28:20.220Z","0.1.6":"2011-04-08T13:13:17.551Z","0.1.7":"2011-05-04T07:52:47.313Z","0.1.8":"2011-06-17T13:22:34.052Z","0.2.0":"2012-03-08T07:05:15.322Z","0.2.1":"2012-07-16T13:44:14.744Z","0.2.2":"2013-06-13T07:15:19.498Z","0.2.3":"2014-08-01T22:58:14.753Z","0.2.4":"2015-02-06T11:12:44.032Z","0.2.5":"2015-02-13T10:52:43.859Z","0.1.9-beta":"2011-06-24T12:31:22.481Z","0.1.9-beta2":"2011-08-04T11:37:19.618Z","0.1.9-beta3":"2011-09-14T13:27:16.218Z"},"author":{"name":"Yuriy Bogdanov","email":"chinsay@gmail.com"},"users":{"stdarg":true,"fanchangyong":true,"dbarth":true,"vitre":true,"erincinci":true,"guananddu":true,"noyobo":true,"pirijan":true,"magicxiao85":true,"nickeljew":true,"meshal":true,"bluelovers":true,"panzy":true,"hohee":true,"kodekracker":true,"meshtech":true,"buzuli":true,"valentin_h":true},"readme":"# Introduction\nnode-sync is a simple library that allows you to call any asynchronous function in synchronous way. The main benefit is that it uses javascript-native design - Function.prototype.sync function, instead of heavy APIs which you'll need to learn. Also, asynchronous function which was called synchronously through node-sync doesn't blocks the whole process - it blocks only current thread!\n\nIt built on [node-fibers](https://github.com/laverdet/node-fibers) library as a multithreading solution.\n\n# Examples\nSimply call asynchronous function synchronously:\n\n```javascript\nvar Sync = require('sync');\n\nfunction asyncFunction(a, b, callback) {\n\tprocess.nextTick(function(){\n\t\tcallback(null, a + b);\n\t})\n}\n\n// Run in a fiber\nSync(function(){\n\t\n\t// Function.prototype.sync() interface is same as Function.prototype.call() - first argument is 'this' context\n\tvar result = asyncFunction.sync(null, 2, 3);\n\tconsole.log(result); // 5\n\n\t// Read file synchronously without blocking whole process? no problem\n\tvar source = require('fs').readFile.sync(null, __filename);\n    console.log(String(source)); // prints the source of this example itself\n})\n```\n\nIt throws exceptions!\n\n```javascript\nvar Sync = require('sync');\n\nfunction asyncFunction(a, b, callback) {\n\tprocess.nextTick(function(){\n\t\tcallback('something went wrong');\n\t})\n}\n\n// Run in a fiber\nSync(function(){\n\n\ttry {\n\t\tvar result = asyncFunction.sync(null, 2, 3);\n\t}\n\tcatch (e) {\n\t\tconsole.error(e); // something went wrong\n\t}\n})\n\n// Or simply specify callback function for Sync fiber\n// handy when you use Sync in asynchronous environment\nSync(function(){\n\t\n\t// The result will be passed to a Sync callback\n\tvar result = asyncFunction.sync(null, 2, 3);\n\treturn result;\n\t\n}, function(err, result){ // <-- standard callback\n\t\n\tif (err) console.error(err); // something went wrong\n\t\n\t// The result which was returned from Sync body function\n\tconsole.log(result);\n})\n```\n\nTransparent integration\n\n```javascript\nvar Sync = require('sync');\n\nvar MyNewFunctionThatUsesFibers = function(a, b) { // <-- no callback here\n\t\n\t// we can use yield here\n\t// yield();\n\t\n\t// or throw an exception!\n\t// throw new Error('something went wrong');\n\t\n\t// or even sleep\n\t// Sync.sleep(200);\n\t\n\t// or turn fs.readFile to non-blocking synchronous function\n\t// var source = require('fs').readFile.sync(null, __filename)\n\t\n\treturn a + b; // just return a value\n\t\n}.async() // <-- here we make this function friendly with async environment\n\n// Classic asynchronous nodejs environment\nvar MyOldFashoinAppFunction = function() {\n\t\n\t// We just use our MyNewFunctionThatUsesFibers normally, in a callback-driven way\n\tMyNewFunctionThatUsesFibers(2, 3, function(err, result){\n\t\t\n\t\t// If MyNewFunctionThatUsesFibers will throw an exception, it will go here\n\t\tif (err) return console.error(err);\n\t\t\n\t\t// 'return' value of MyNewFunctionThatUsesFibers\n\t\tconsole.log(result); // 5\n\t})\n}\n\n// From fiber environment\nSync(function(){\n\t\n\t// Run MyNewFunctionThatUsesFibers synchronously\n\tvar result = MyNewFunctionThatUsesFibers(2, 3);\n\tconsole.log(result); // 5\n\t\n\t// Or use sync() for it (same behavior)\n\tvar result = MyNewFunctionThatUsesFibers.sync(null, 2, 3);\n\tconsole.log(result); // 5\n})\n```\n\nParallel execution:\n\n```javascript\nvar Sync = require('sync'),\n\tFuture = Sync.Future();\n\n// Run in a fiber\nSync(function(){\n\ttry {\n\t\t// Three function calls in parallel\n\t\tvar foo = asyncFunction.future(null, 2, 3);\n\t\tvar bar = asyncFunction.future(null, 5, 5);\n\t\tvar baz = asyncFunction.future(null, 10, 10);\n\t\n\t\t// We are immediately here, no blocking\n\t\n\t\t// foo, bar, baz - our tickets to the future!\n\t    console.log(foo); // { [Function: Future] result: [Getter], error: [Getter] }\n\t\n\t\t// Get the results\n\t\t// (when you touch 'result' getter, it blocks until result would be returned)\n\t\tconsole.log(foo.result, bar.result, baz.result); // 5 10 20\n\t\n\t\t// Or you can straightly use Sync.Future without wrapper\n\t\t// This call doesn't blocks\n\t\tasyncFunction(2, 3, foo = Future());\n\t\n\t\t// foo is a ticket\n\t    console.log(foo); // { [Function: Future] result: [Getter], error: [Getter] }\n\n\t\t// Wait for the result\n\t\tconsole.log(foo.result); // 5\n\t}\n\tcatch (e) {\n\t\t// If some of async functions returned an error to a callback\n\t\t// it will be thrown as exception\n\t\tconsole.error(e);\n\t}\n})\n```\n\t\nTimeouts support\n\n```javascript\t\nvar Sync = require('sync'),\n\tFuture = Sync.Future;\n\nfunction asyncFunction(a, b, callback) {\n\tsetTimeout(function(){\n\t\tcallback(null, a + b);\n\t}, 1000)\n}\n\n// Run in a fiber\nSync(function(){\n\t\n\t// asyncFunction returns the result after 1000 ms\n\tvar foo = asyncFunction.future(null, 2, 3);\n\t// but we can wait only 500ms!\n\tfoo.timeout = 500;\n\n\ttry {\n\t    var result = foo.result;\n\t}\n\tcatch (e) {\n\t    console.error(e); // Future function timed out at 500 ms\n\t}\n\n\t// Same example with straight future function\n\tasyncFunction(2, 3, foo = new Future(500));\n\n\ttry {\n\t    var result = foo.result;\n\t}\n\tcatch (e) {\n\t    console.error(e); // Future function timed out at 500 ms\n\t}\n})\n```\n\n# How to address non-uniform callbacks\nSometimes third-party libraries are not following convention and passing multiple result parameters to the callback, e.g. `callback(err, recordsets, returnValue)`. In this situation, `node-sync` will simply return array of values instead of value.\n\n```javascript\n// Asynchronous which returns multiple arguments to a callback and returning a value synchronously\nfunction asyncFunctionReturningMultipleArguments(callback) {\n    process.nextTick(function(){\n        callback(null, 2, 3);\n    })\n}\n\nSync(function(){\n    var result = asyncFunctionReturningMultipleArguments.sync();\n    assert.equal(result, [2, 3]);\n})\n```\n\t\nSee more examples in [examples](https://github.com/0ctave/node-sync/tree/master/examples) directory.\n\n# Installation\ninstall\n\n```bash\n$ npm install sync\n```\nand then\n\n```bash\n$ node your_file_using_sync.js\n```\n","homepage":"https://github.com/ybogdanov/node-sync","repository":{"type":"git","url":"https://github.com/ybogdanov/node-sync.git"},"bugs":{"url":"https://github.com/ybogdanov/node-sync/issues"},"license":"MIT","readmeFilename":"README.md"}