{"_id":"when-traceable","_rev":"28-f43485df2fd4eeea79e179c0d8ba61d9","name":"when-traceable","dist-tags":{"latest":"0.2.3"},"versions":{"0.0.1":{"name":"when-traceable","version":"0.0.1","description":"","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"traceable":"^0.2.1"},"_id":"when-traceable@0.0.1","_shasum":"299b22fac6ed759bfac07f42d3253be1c92a0e99","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"299b22fac6ed759bfac07f42d3253be1c92a0e99","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.0.1.tgz","integrity":"sha512-mN8Uloa5lA+gjQqFlxSHo7pJHXBj1cikL5OAdC5YgxhJUEGtDqAsDRw06va1I3yljUxP9LfjxCyrqFMGs7zdDg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIECxs7Br/HUMRmRTDVFonhsEv7LjSNqWQgS3B4H+wV3nAiEAwifhJJ151enz4dmjnS0iUqEkrrZaToimUSSTr6jAc8c="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.0.1.tgz_1470372166973_0.9160340137314051"},"deprecated":"Migrate to source controlled version"},"0.0.2":{"name":"when-traceable","version":"0.0.2","description":"","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"traceable":"^0.2.1"},"_id":"when-traceable@0.0.2","_shasum":"e8f7f3f0cb5b672369d7a2be9067ad7d31c8943a","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"e8f7f3f0cb5b672369d7a2be9067ad7d31c8943a","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.0.2.tgz","integrity":"sha512-PnSj0xZjAKQsybvbG3AXOCMsB6JzFFs/HzqGB6qEYxzLqFrA1E8AEv+wupsEkdz7LtT7se2cN5z+94DvUsrBCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOw5TxS+WVQJsFI/Yt0PEplpFokH8kxwcQuwRto/fpOAIgRJoRbTk1A+SFcmygMuJeH3dum6BkqE/X03EIa6vObHk="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.0.2.tgz_1470372539657_0.4260238786228001"},"deprecated":"Migrate to source controlled version"},"0.0.3":{"name":"when-traceable","version":"0.0.3","description":"","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"traceable":"^0.2.1"},"_id":"when-traceable@0.0.3","_shasum":"8301f58e01c9bbe240297643f148f3c46c0b72e2","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"8301f58e01c9bbe240297643f148f3c46c0b72e2","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.0.3.tgz","integrity":"sha512-9ibCBHe/8WzrEpIjPLwqJNz1vge2QaxbE0PxWv9c9bCc53Qrim5U2Rp5r/pC5o3i8d77FFhcgiDrzHlIk4knXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIByqRfxsKiPzsD1988b+FBHNAsPqjT14tNqg9afKeBhAAiAKDuyaQUqECpNxfmstcMes1NYy1o6XyZGb3OdR96OinQ=="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.0.3.tgz_1470377584550_0.8389048844110221"},"deprecated":"Migrate to source controlled version"},"0.1.0":{"name":"when-traceable","version":"0.1.0","description":"","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"traceable":"^0.2.1"},"_id":"when-traceable@0.1.0","_shasum":"71d05efa1e4b8f25ef767b640bc5fc5a837a94cf","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"71d05efa1e4b8f25ef767b640bc5fc5a837a94cf","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.0.tgz","integrity":"sha512-KE3VZzkDzVy/d4TifdwDJYfaOljV0TmuJNHEPDltKjRfX8OEBQ9chVFuG5IaTwqMcdO5RUPXT7FeRLSJA1JtMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEoIm2ghE5DCebBgt3amddLKDsnNkOu8uaDTs/Z870K1AiBtO35P8utw28i9IyLiGuRpwm4rHNGEhDrZXlBX4ZSi/w=="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.0.tgz_1470417139406_0.6911356537602842"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.0.3.tgz","deprecated":"Migrate to source controlled version"},"0.1.1":{"name":"when-traceable","version":"0.1.1","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"traceable":"^0.2.2"},"_id":"when-traceable@0.1.1","_shasum":"d8dfc22f5f9f1ffe6690f467ee2eface218f0965","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"d8dfc22f5f9f1ffe6690f467ee2eface218f0965","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.1.tgz","integrity":"sha512-Cnyk5x8lZKZsY4ZG9GF8uoeckhsWlsxPYmGkJPsYt4X9Q2miLa/GHcX37ZR70ZbmJ8RzwWxLkpjIjvQWlz+ucw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtQ/s6vJFtOkO94Y1NMqh9Pmoc+1IHUPO5VGGO2U0CQwIhANy864oB1dSQBPxc4JRLCI9YPfL+SGiCnhqDUEbBbfqn"}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.1.tgz_1470417227677_0.6838657741900533"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.0.3.tgz","deprecated":"Migrate to source controlled version"},"0.1.2":{"name":"when-traceable","version":"0.1.2","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"traceable":"^0.2.2"},"_id":"when-traceable@0.1.2","_shasum":"891017b2cfd632dc03b2aaa8982e9cae867ab155","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"891017b2cfd632dc03b2aaa8982e9cae867ab155","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.2.tgz","integrity":"sha512-9PjrZWqVnmw3++8ZKJnT1D8RzzOstWJ54uFvbHy4laBEuo3b9RejqnrlTFZVMKTM+RVx2rWuAi0jFkNE+ORUpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZUxHzGRSaL7HwNZDO5PsUCrB8MKJ0hGTJuKrF/gzIMAiAHttvAehSgivzzYtVHnqaJmc6KFGBV8FATZ6LLxvQ57Q=="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.2.tgz_1470574333330_0.6968689926434308"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.1.tgz","deprecated":"Migrate to source controlled version"},"0.1.4":{"name":"when-traceable","version":"0.1.4","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"_id":"when-traceable@0.1.4","_shasum":"2cec14e94c13a1f44a43997786cd8b6eb24a802d","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"2cec14e94c13a1f44a43997786cd8b6eb24a802d","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.4.tgz","integrity":"sha512-iwZl2+O2PbjbFUPUDdS3H4OLRgmFs6B3SFqNQKNXVrDfnyrsVGy3VFTPcb9OdzNcgqFZfz1KD+ewI49/3wBd6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFezdIpj+zxXdYnW4g7NPzs+ScG6UwDRaimqzS5fRNbFAiABi9yK9MnMFWwgvXh1dG4Q/A9O5Snpz8nboBjlGgGIwQ=="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.4.tgz_1470586276342_0.35628632502630353"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.2.tgz","deprecated":"Migrate to source controlled version"},"0.1.5":{"name":"when-traceable","version":"0.1.5","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"_id":"when-traceable@0.1.5","_shasum":"be2c2a6073e09aeddbc93af8b6250f639f1d2053","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"be2c2a6073e09aeddbc93af8b6250f639f1d2053","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.5.tgz","integrity":"sha512-MdPFiA4hHFA6VE7kUOFQBo9ge6vSXC2PsVHc8oVRnxq8JQW8OU9A6EmcWp56CCy7ghqEDDo1l30Pe0Taa2yN0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9cPn2kwIZHERErp41q99S6B7OMMpTI0iH6AyAmgTK2AiAu/UzYNVKKPZ4iJzLiOGXiDuS1sTJVgp2OGKuUPcA78w=="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.5.tgz_1470642021988_0.1182517649140209"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.4.tgz","deprecated":"Migrate to source controlled version"},"0.1.6":{"name":"when-traceable","version":"0.1.6","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"_id":"when-traceable@0.1.6","_shasum":"072697b45dff404b46237973e57b8831e59c8f7e","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"072697b45dff404b46237973e57b8831e59c8f7e","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.6.tgz","integrity":"sha512-cczEEsKzjBJf/smvgQzcJBRNzlcwjdt1GNNMNnSrMSG7H8gnhB+ezAt/KDoRY77Wdp7TVYV7ouRIyl2TbnT8vQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCX4s7t7grBi40iua2WqZZ6IW8vhXvsBC1HlPfOYPsSkQIhAJmCe2gDv0ECjzTVewBkbLovnSyQwz/U+xfO8jkwInk5"}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.6.tgz_1470645473278_0.12863011774607003"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.4.tgz","deprecated":"Migrate to source controlled version"},"0.1.7":{"name":"when-traceable","version":"0.1.7","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"_id":"when-traceable@0.1.7","_shasum":"df10e16c3e1ba9fc43c55c6d005ea06b50e4c904","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"df10e16c3e1ba9fc43c55c6d005ea06b50e4c904","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.7.tgz","integrity":"sha512-xjU5Z4xAYraSs44QTB/YC7+MoSJP2QIx9304Mm38In9WbWOxjdPtpiUSBpNN5ZZcVEMUpUF7MAjqJGIf22VhNg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDe4T5sZfD968fN/1WwttEOQteJ2KA0lDp3C3YxveuwoQIgOUsS6WKd2GqU3MxNH1fOZYg3G3BrPMJLDXsF3A3IaaE="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.7.tgz_1470718658752_0.0037396010011434555"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.4.tgz","deprecated":"Migrate to source controlled version"},"0.1.8":{"name":"when-traceable","version":"0.1.8","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"_id":"when-traceable@0.1.8","_shasum":"592d5fd271c9058fa6ad62954660bba3c7aea99f","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"592d5fd271c9058fa6ad62954660bba3c7aea99f","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.8.tgz","integrity":"sha512-pfsxmFQySnvhm86PsEaj2sqNajapF4y2I/QmxRILxOskNZBvreCOF7p9qhbiVKZR/3dg8DpuzFZJ4lBxHpyibQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGMtLalkXErSNtlBbLBxiFrHoSLMNGNXMajnc7BfmpAQAiEA/xqdRHKyqHDA9AEUbA2kIq1n8nclwKWXyQPBHas7Stk="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.8.tgz_1470732456593_0.5837031060364097"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.4.tgz","deprecated":"Migrate to source controlled version"},"0.1.9":{"name":"when-traceable","version":"0.1.9","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"_id":"when-traceable@0.1.9","_shasum":"e8980e946d7e71028155fabc10a19e8befe0692a","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"e8980e946d7e71028155fabc10a19e8befe0692a","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.9.tgz","integrity":"sha512-n/5g6U1QeKoYtoMTSv6OoEQHWwlgJ7lZUpWQUHp1I9fs6yM7HfGnEepxGl2Dnu4DGkYzr8JSyniTK+2hamEU/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKf+B14Jq02xES2S8CvmAHxrg6PaO8ZUzXyYLrZws5MAIhAJDRH9B1SgDXFzIXtLaJQ+WFwwOwlFAdMqk7RDTL8Jwd"}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.9.tgz_1470751681983_0.1801837501116097"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.8.tgz","deprecated":"Migrate to source controlled version"},"0.1.10":{"name":"when-traceable","version":"0.1.10","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"_id":"when-traceable@0.1.10","_shasum":"b49bb162fcd010a18d198965940f09917e5cf1b5","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"b49bb162fcd010a18d198965940f09917e5cf1b5","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.10.tgz","integrity":"sha512-onIUhSDmqfUIX/66gkBQhTOcHNx1z02ZnuRH3UN4drsBJZulhY3Jc9Sd9tJTZHZOxC5F61++aj2CiwfrgczsOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0nSYGfDsUIxSUJRDoW7hSDe0ScBqN3ta3v/A6LEwD9AiEA50HNYoy38bx26mRX6+x3MtvYrLVsUTKK5JnkJTAiAbE="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.10.tgz_1470810520334_0.450255612609908"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.9.tgz","deprecated":"Migrate to source controlled version"},"0.1.11":{"name":"when-traceable","version":"0.1.11","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"_id":"when-traceable@0.1.11","_shasum":"47b1534878050b6436f0548251c56ad46f49be23","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"47b1534878050b6436f0548251c56ad46f49be23","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.11.tgz","integrity":"sha512-0qO8zjtVToHN38ZT4cPvfMXxjIwGvp56fwbTlPAggh5eZNHjSNq/4o2/9oAnZAwm7If168lP5dgyoM7U6YclrA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwbVx2nhtQjDm3bf/c4IuiuSJbbHHZmdncuBIdLPlUEAIgHvJq9kc/o2qLJMqX4RqUnVa9CBEwQgThkoTz1Sl34SY="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.11.tgz_1470817726347_0.07734520360827446"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.9.tgz","deprecated":"Migrate to source controlled version"},"0.1.12":{"name":"when-traceable","version":"0.1.12","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"_id":"when-traceable@0.1.12","_shasum":"0af709cffdcac7751b5cef85d22d812f647c194f","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"0af709cffdcac7751b5cef85d22d812f647c194f","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.12.tgz","integrity":"sha512-TqGHJs5ejDOZvslwDhNDc3pgO0V6olP7XlMcfYVafx6n7WchbFDv0qj5CXwOXzo7VmEqkwAFOlwCv320aRZB3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYZhItZ67eLiT0N1zzoESDyot09xzcWMYi+W5z2nCMKQIgD0/yem2BbpbbkX1i3Kzs9WBktxePD3OOzUiKNv7k3UM="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.12.tgz_1470832344519_0.5453165951184928"},"directories":{},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.9.tgz","deprecated":"Migrate to source controlled version"},"0.1.13":{"name":"when-traceable","version":"0.1.13","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"dist":{"shasum":"75e276b1b36a78ddac92909f43f243f955eadd4c","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.13.tgz","integrity":"sha512-K24iG2R2T0b9CS/yQKyOQrFlhaDK1ErKTuFVOc3Z6Uz6RUoGvV9/XcGo+7yjvGHlwaOwhoXc5pnRRAq/y34vyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8z+NuSoQ6Mn0oLb0tiecX1x/6e+Filrjtk6PSS+xAQQIhAK5WjGYQXT7sd6vwax3O9u4D1SJr8CazBwqxkfUa2WJp"}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"This is an experimental extension to the [traceable](https://www.npmjs.com/package/traceable) package.","_id":"when-traceable@0.1.13","_shasum":"75e276b1b36a78ddac92909f43f243f955eadd4c","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.13.tgz_1470910298490_0.6936351407784969"},"deprecated":"Migrate to source controlled version"},"0.1.14":{"name":"when-traceable","version":"0.1.14","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"dist":{"shasum":"d6759e66fbfc2e7d9ffa6b0f4d2637840a48f9d2","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.14.tgz","integrity":"sha512-yE1dJvhqiuf22/TOviPiFDTtN0N2m8sVor0L9Z11RZkgFdSVeGhcWBulybtclOasmw/wqgrUtzrPOTo2rC3Kjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4lI+VFh24fT/ulTLH2OEd3SoHndR1fNSOEPfXSVjW6AIgQ22TlHfrAoRt177Z3DFJuHCaV0Hr2kHNQdTqUmmgPjU="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"This is an experimental extension to the traceable package.","_id":"when-traceable@0.1.14","_shasum":"d6759e66fbfc2e7d9ffa6b0f4d2637840a48f9d2","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.14.tgz_1470910549868_0.018502523424103856"},"deprecated":"Migrate to source controlled version"},"0.1.15":{"name":"when-traceable","version":"0.1.15","main":"when.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"dist":{"shasum":"8399af81724257d5478c856e54646d1d09e08940","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.15.tgz","integrity":"sha512-aT/ldhBfKb+/QEbBK74sQAn+8SOupOTyoOK/ifjiTADqDGMOnRS+dMDYgoGkXGwC90w/RYXMRvWGkbkl4Nb6LQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC+LkJWWMFLm0o6eVmHzVFdDRiFvkcmCAXdiB6F2bl/jAiBoCvZ2BifC2ZmRGeek6cYH4cd8yUYTlH8EVJAM9LpyzA=="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"This is an experimental extension to the traceable package.","_id":"when-traceable@0.1.15","_shasum":"8399af81724257d5478c856e54646d1d09e08940","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.15.tgz_1470925605255_0.6150905760005116"},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.14.tgz","deprecated":"Migrate to source controlled version"},"0.1.16":{"name":"when-traceable","version":"0.1.16","main":"when.js","scripts":{"test":"qunit -c when:./when.js -t tests/tests.js"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"devDependencies":{"qunit":"^0.9.1"},"dist":{"shasum":"ae6c737502a7efd53a84a2918ea1f457b08de6b2","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.16.tgz","integrity":"sha512-kOpqtAwn37NSFESOdJCjrxGJvIKzvdmcIu67128cMXX1aeyhTPXftCMs0Suu3ng+NRFwb+vjdHvyUrh+yDrBug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQxLi9FooqBpe0JljjWQNNPAYuPuaYlCCiQjU48y2aDQIgQ6Ycn5Rk+kcEsTw9nvCoYR60T4MarKmUi4CezAntg4w="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"This is an experimental extension to the traceable package.","_id":"when-traceable@0.1.16","_shasum":"ae6c737502a7efd53a84a2918ea1f457b08de6b2","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.16.tgz_1470994394532_0.06530753895640373"},"deprecated":"Migrate to source controlled version"},"0.1.17":{"name":"when-traceable","version":"0.1.17","main":"when.js","scripts":{"test":"qunit -c when:./when.js -t tests/tests.js"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"devDependencies":{"qunit":"^0.9.1"},"dist":{"shasum":"da10ebbba25417fb0ae3285b0ed70551003e16a2","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.17.tgz","integrity":"sha512-z8JoLvoD+3yjpxw+prLbFag3MV6F8RZPr4aTGtnsIb76j20XMm3OyagdDSmtvVv2ytVT9n5NJkZov901prXCfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG0yT2+8TLVesHYwug6DcAh8l/z1zdKDjWIa77fg6EEHAiB6YL0cf3Am9gUfz4deeTd7P8IUbMAgMrWqeWwrHc2SdA=="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"This is an experimental extension to the traceable package.","_id":"when-traceable@0.1.17","_shasum":"da10ebbba25417fb0ae3285b0ed70551003e16a2","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.17.tgz_1471001069328_0.21159389382228255"},"deprecated":"Migrate to source controlled version"},"0.1.18":{"name":"when-traceable","version":"0.1.18","main":"when.js","scripts":{"test":"qunit -c when:./when.js -t tests/tests.js"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"devDependencies":{"qunit":"^0.9.1"},"dist":{"shasum":"2e8614dc84e0dec9450215450ad54d6ae7db052d","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.18.tgz","integrity":"sha512-A6j2bbBWlt1Qejl+BKWBE01GfWKONG87AwcTTGSlev/qYShZqSBmgrZZhGpZ63YLSsxA+LYj4V5M5vRumi6flg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDEzKxxf1wfflqVMn6YkLG7c+Kze68nWxmYZKA/CAA6+AiEAtBx2jgVQO+Dy+nUcUH7Hi7Lm7ryj4wR09PkPSMFf0NI="}]},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"This is an experimental extension to the traceable package.","_id":"when-traceable@0.1.18","_shasum":"2e8614dc84e0dec9450215450ad54d6ae7db052d","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.1.18.tgz_1471008419871_0.7940045210998505"},"_resolved":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.1.17.tgz","deprecated":"Migrate to source controlled version"},"0.2.0":{"name":"when-traceable","version":"0.2.0","main":"when.js","scripts":{"test":"qunit -c when:./when.js -t tests/tests.js"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"repository":{"type":"git","url":"git+https://github.com/misonou/node-when-traceable.git"},"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"devDependencies":{"qunit":"^0.9.1"},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"Promises/A+ solution with traceable fused that ease debugging to async code.","gitHead":"49d945b897bf12dbac78d5682637e6bd38cb1126","bugs":{"url":"https://github.com/misonou/node-when-traceable/issues"},"homepage":"https://github.com/misonou/node-when-traceable#readme","_id":"when-traceable@0.2.0","_shasum":"7cac91b6af5fa3c1028bcd6f74dd71386346204a","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"7cac91b6af5fa3c1028bcd6f74dd71386346204a","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.2.0.tgz","integrity":"sha512-Nggl6+2aS1XHfbPXRzsbXGr9UK/snWUkKp5lVJooLidP4He6qfaP4i6ZN7KIz4JHT9ialTMTfWkRDbqZypaXtQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUjmfoW8s3xM2Zqfub+wnYpIR6U8pKMKa8BJrrftzRCAIgNsHfPyYTdgalfLu9kqyk47GxIevqrmlxgNIMT0m4mV8="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.2.0.tgz_1471011754831_0.6457559715490788"}},"0.2.1":{"name":"when-traceable","version":"0.2.1","main":"when.js","scripts":{"test":"qunit -c when:./when.js -t tests/tests.js"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"repository":{"type":"git","url":"git+https://github.com/misonou/node-when-traceable.git"},"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"devDependencies":{"qunit":"^0.9.1"},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"Promises/A+ solution with traceable fused that ease debugging to async code.","gitHead":"49d945b897bf12dbac78d5682637e6bd38cb1126","bugs":{"url":"https://github.com/misonou/node-when-traceable/issues"},"homepage":"https://github.com/misonou/node-when-traceable#readme","_id":"when-traceable@0.2.1","_shasum":"74720637d742329d681969c358c864bac2c93772","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"74720637d742329d681969c358c864bac2c93772","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.2.1.tgz","integrity":"sha512-Ovz0ag49O/2c+yxT6mqNdfR3TSU9S+1T2LMMxEljWg9UFigkOBTbSAx1PgpbBHN0rzFatfPjGu99lxkita6U+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5XH6MgDq+v0GkglgX0ZaNnU5suUkHYNkVMNZ172OxZQIhAMvq4uHpODLx5cwWpfRKsX1lqHUIS0c3FLmV+0Z1T118"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.2.1.tgz_1471107269516_0.8320965573657304"}},"0.2.2":{"name":"when-traceable","version":"0.2.2","main":"when.js","scripts":{"test":"mocha tests/tests.js"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"repository":{"type":"git","url":"git+https://github.com/misonou/node-when-traceable.git"},"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"devDependencies":{"mocha":"^3.0.2"},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"Promises/A+ solution with traceable fused that ease debugging to async code.","gitHead":"23e8e0396612debc7e136f81a6ee4f005c6e6ff9","bugs":{"url":"https://github.com/misonou/node-when-traceable/issues"},"homepage":"https://github.com/misonou/node-when-traceable#readme","_id":"when-traceable@0.2.2","_shasum":"3442f07db72b04f5fc3a020f24fedb04704d5abd","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"3442f07db72b04f5fc3a020f24fedb04704d5abd","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.2.2.tgz","integrity":"sha512-wiBH/Crpqq0NDiUe7Dhx7Yi/oGsUq/fV/Murr9MgYXAkJFtc3M58L1ZvjPpIHuo86FWGAebwvWALNurR9mHSlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDYlRRDPbe2KYYTwrSxlI3yX7HRT1ngiynVCsbeAnInXAiB6heiFmez99Bdtmgq/NlO4RqvnEP9s0usZPpMB2bI2mQ=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/when-traceable-0.2.2.tgz_1471237060799_0.2544737549033016"}},"0.2.3":{"name":"when-traceable","version":"0.2.3","main":"when.js","scripts":{"test":"mocha -R spec"},"author":{"name":"misonou"},"license":"MIT","keywords":["async","promise","deferred"],"repository":{"type":"git","url":"git+https://github.com/misonou/node-when-traceable.git"},"dependencies":{"promise":"^7.1.1","traceable":"^0.2.2"},"devDependencies":{"mocha":"^3.0.2"},"maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"directories":{},"description":"Promises/A+ solution with traceable fused that ease debugging to async code.","gitHead":"1b7e7725fbc70bb9b6a86f1cd88194c1435a99f1","bugs":{"url":"https://github.com/misonou/node-when-traceable/issues"},"homepage":"https://github.com/misonou/node-when-traceable#readme","_id":"when-traceable@0.2.3","_shasum":"ef727973cd56d7957875a41d16d6f2c9a14ccd9a","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"misonou","email":"misonou.mirai@gmail.com"},"dist":{"shasum":"ef727973cd56d7957875a41d16d6f2c9a14ccd9a","tarball":"https://registry.npmjs.org/when-traceable/-/when-traceable-0.2.3.tgz","integrity":"sha512-pQRpI6HAmeDWAfF560i3lBTOb2wZ4HkVRqoAkia4WJ1Ur20CkAJ/ITYVR69jz1Uta2e6ohFQ1LOOY0grailnog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfpPZEZwlyWhF17xHIC69zf/2zjausSaOGPdjwRpwUSQIhAMRDRAcWfM6aaDbYJM3rUfPhdj2cpGTx27zRS6MxSXTU"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/when-traceable-0.2.3.tgz_1471362802304_0.5561587414704263"}}},"readme":"This is an Promises/A+ solution with [traceable](https://www.npmjs.com/package/traceable) fused\nthat ease debugging to async code.\n\n## when\n\nReturns a Promise/A+ object that is to be fulfilled or rejected in the future or immediately.\nSpecifically promise objects created by this library relies on the [promise](https://www.npmjs.com/package/promise) package.\n\nHowever for arguments that requires a promise object, any objects of Promise/A+ implementation should work.\n\n### Long stack trace\n\nAll errors raised during asynchronous callback are all processed by the [traceable](https://www.npmjs.com/package/traceable) package\n  so you can access the stack trace of the previous event loop.\n\n```javascript\nwhen(function (then) {\n    fs.readFile('/inexist/path', then(function (data) { }));\n}).catch(function (err) {\n    console.log(err.stack);      // Error: ENOENT: ... at Error (native)\n    console.log(err.asyncStack); // Error at myfile.js:2:35 at ...\n});\n```\n\n### Resolving routine\n\nWith *handler* and *fulfilling value*: \n\n- If *handler* is a function, call the function with the *fulfilling value*:\n    - If exception raised during callback or an `Error` object is returned, follow the **error handling routine**.\n    - Otherwise let *handler* to be the returned value and continue.\n- If *handler* is a promise object, wait until:\n  - When that promise is fulfilled, fulfill with its fulfilling value.\n  - When that promise is rejected, follow the **error handling routine**.\n- If *handler* is not `undefined` fulfill with *handler*.\n- Otherwise fulfill with *fulfilling value* or otherwise specified (**null action**).\n\n### Error handling routine\n\nWith *handler* and *error*:\n\n- If *handler* is a function, follow **resolving routine** with *handler* and **null action** being rejecting with the same error.\n- If *handler* is a map:\n  - If exception code (i.e. `Error#name` or `Error#code`) is one of the keys:\n    - If the associated map value is a `string`, reject with an error with the new code and same message.\n    - If the associated map value is a `function`, follow the **error handling routine** again.\n  - If the `default` key presents on the map:\n    - Follow the subroutine as if the exception code is one of the keys.\n- Otherwise reject with the same error.\n\n```javascript\nwhen(promise, function (value) {\n    return anotherPromise; // Take the state of `anotherPromise`\n    return anotherValue;   // Fulfull with `anotherValue`\n    throw new Error();     // Call `onerror` if supplied or reject with error\n});\nwhen(promise, function (value) {\n    console.log(value);    // Tap on fulfillment\n});\nwhen(promise, null, function (err) {\n    return anotherPromise; // Take the state of `anotherPromise`\n    return value;          // Fulfill with `value` instead of rejection\n    throw new Error();     // Reject with new error \n});\nwhen(promise, null, function (err) {\n    console.log(err);      // Tap on rejection\n});\nwhen(promise, null, {\n    ETIMEOUT: function () {\n        return null;       // Ignore ETIMEOUT error\n    },\n    default: 'ENOENT'      // Throw ENOENT in case of any other errors\n});\n\n// Combining `then` and `onerror`\nwhen(promise, function (value) {\n    /* `onerror` will be called with the raised exception */\n    throw new Error();\n}, function (err) {\n    /* Reach here when promise is fulfilled or rejected */\n});\n```\n\nIt is very similar to calling `Promise#then(then, onerror)` ***except*** that\n  - `onerror` can catch any exceptions or errors from `then`; and\n  - any asynchronous subsequent exceptions or errors from `then` and `onerror`.\n\nSo retry can be easily written as\n\n```javascript\nvar retryCount = 0;\nwhen(promise, doSomething, function (err) {\n    // When retried less than 5 times\n    // run again and let the promise to follow the state again\n    // if `doSomething` fails again this error handler will be called again \n    if (++retryCount < 5) {\n        return doSomething();\n    }\n});\n```\n\n### `when(fn, [onerror])`\n\nRuns the callback `fn` and returns a promise object.\n\n```javascript\nwhen(function (then) { /* do something */ });\n```\n\nThe `fn` function receives a function argument `then`.\nThe primary usage of `then` is to deal with Node.js callback pattern.\n\nIf `then` is called with `handler`, it returns a callback function that handles Node.js callback where:\n- If error is received, follow the **error handling routine** with `onerror` as *handler*.\n- Otherwise follow the **resolving routine** with `handler` as *handler* and **null action** being doing nothing.\n\n```javascript\n// Promise fulfilled with the file size\nwhen(function (then) {\n    fs.stat('/path/to/file', then(function (data) {\n        return data.size;\n    }));\n});\n\n// Promise fulfilled with `fs.Stats`\nwhen(function (then) {\n    fs.stat('/path/to/file', then());\n});\n\n// Promise that check if the file exists and then read the file content\nwhen(function (then) {\n    fs.stat('/path/to/file', then(function (data) {\n        fs.readFile('/path/to/file', then());\n        // Does not return anything so the promise is not fulfilled at this time\n        // promise will be fulfilled with file content when callback of `fs.readFile` is called\n    }));\n});\n```\n\n### `when(value, [then], [onerror])`\n\nIf none of the overloads listed below matches, returns a fulfilled promise with `value`.\n`then` and `onerror` will be supplied as handlers for **resolving routine** and\n**error handling rountine**.\n\n\n### `when(Promise, [then], [onerror])`\n\nReturns a promise that wait until the given promise is fulfilled or rejected,\nand resolve the promise by **resolving routine** with the fulfilled value as *handler*.\n\n```javascript\n// Promise fulfilled with 2\nwhen(promiseOne, function (value) {\n    assert(value === 1);\n    return value * 2;\n});\n```\n\n### `when(Array<Promise>, [then], [onerror])`\n\nReturns a promise that wait until all promises are fulfilled or rejected:\n- If any promises is rejected, follow the **error handling routine** with the first encountered error.\n- Otherwise follow the **resolving routine** with an array of fulfilled values as *handler*.\n\nIf more than one promise is rejected, other errors will sinked silently.\nTo catch the sinked errors use `when.monitor`.\n\n```javascript\nwhen([promiseUndefined, promiseOne, promiseTwo], function (data) {\n    assert(data.length === 3);       // Outcome array has the same length\n    assert(data[0] === undefined);   // Undefined result stay in the correct index\n    assert(data[1] === 1);\n    assert(data[2] === 2);\n});\n```\n\n### `when(Object<Promise>, [then], [onerror])`\n\nReturns a promise that wait until all promises are fulfilled or rejected:\n- If any promises is rejected, follow the **error handling routine** with the first encountered error.\n- Otherwise follow the **resolving routine** with a map of fulfilled values as *handler*.\n\nIf more than one promise is rejected, other errors will sinked silently.\nTo catch the sinked errors use `when.monitor`.\n\n```javascript\nwhen({\n    one: promiseOne,\n    two: promiseTwo\n}, function (data) {\n    assert(data.one === 1);\n    assert(data.two === 2);\n});\n```\n\n### `when(EventEmitter, [eventHandlers], [onerror])`\n\nReturns a promise that:\n- When the `EventEmitter` emits an `error` event, follow the **error handling routine** with the error.\n- If listened event is emitted, follow the **resolving routine** with the first argument as *handler*.\n\n```javascript\n// Fulfill when response emit `end` event with the first argument\n// Reject when response emit `error` event\nwhen(response, 'end');\n\n// Fulfill when response emit `end` event with custom value\nwhen(response, 'end', function () {\n    return state;\n});\n\n// Fulfill on multiple event\nwhen(response, {\n    end: function () { /* ... */ },\n    close: function () { /* ... */ }\n});\n```\n\n### `when(Array<Function>)`\n\nReturns a promise that sequentially calls the functions.\n\nThe promise will always be resolved after call on the last element.\nAny exception raised in `callback` will not break the asynchronous loop.\nTo catch the sinked errors use `when.monitor`.\n\n```javascript\nwhen([printOne, printTwo, printThree]); // Print out \"123\"\n```\n\n### `when(Error)`\n\nReturns a rejected promise with the given error.\n\n## Utilities\n\n### `when.map(array, callback, [then], [onerror])`\n\nCalls `callback` on each element in the `array`, creating promise objects on each value from the calls, and\nreturns a promise that wait until all promises are fulfilled or rejected.\n\n```javascript\n// Promise fulfilled with [1, 4, 9] \nwhen.map([1, 2, 3], function (number) {\n    return squarePromise(number);\n});\n\n// Both the immediately returned promises and the fulfilled values of the promises\n// are flatten if their elements contains arrays\n// the following promise is fulfilled with [2, 3, 1, 4, 6, 4, 6, 9, 9]\nwhen.map([1, 2, 3], function (number) {\n    return [\n        doubleAndTriplePromise(number),\n        squarePromise(number)\n    ];\n});\n\n// Promises and values can be mixed on the map callback\n// the following promise is fulfilled with [1, 4, 3]\nwhen.map([1, 2, 3], function (number) {\n    return isOdd(number) ? number : doublePromise(number);\n});\n```\n\n### `when.forEach(array, callback, [then], [onerror])`\n\nSequentially calls `callback` on each element in the array after the promise returned from the last call is fulfilled or rejected.\n\nThe promise will always be resolved after call on the last element.\nAny exception raised in `callback` will not break the asynchronous loop.\nTo catch the sinked errors use `when.monitor`.\n\n```javascript\n// `arr` will contain the exact sequence of numbers as the input array\nvar arr = [];\nwhen.forEach([1, 2, 3, 4, 5], function (number) {\n    return delayRandomPromise(function () {\n        arr.push(number);\n    });\n});\n```\n\n### `when.while(fn, [then], [onerror])`\n\nAsychronous version of `while((value = fn(value)) !== false)`.\nThe fulfilled value returned from the `fn` callback will be tested and as the parameter of the next call to `fn`.\n\n```javascript\nvar result = [];\nwhen.while(function (pageIndex) {\n    return when(getPagedResult(pageIndex || 0), function (data) {\n        Array.prototype.push.apply(result, data.items);\n        // If there is next page of results return the next page index\n        // `fn` will be called with the returned page index\n        if (data.hasNextPage) {\n            return (pageIndex || 0) + 1;\n        }\n        // Return `false` to end the asynchronous loop\n        // Can also return a promise if it is not immediately available\n        return false;\n    });\n},\n// Resolve the promise from `when.while` by the combined results\nresult);\n```\n\n### `when.monitor([options], callback)`\n\nBy this the returned promise object is exteneded with `EventEmitter` so you can listen various event.\n\n##### `timeout` event\n\nIf `timeout` options is specified, the `timeout` event is emitted when one of the promise in the promise chain\ndid not fulfill or reject in the given amount of time.\n\nThe error object is raised with call stack information about the promise creation location.\n\n```javascript\nwhen.monitor({\n    // timeout in milliseconds\n    timeout: 10000 \n}, function () {\n    return wontFulfillPromise();\n}).on('timeout', function (err) {\n    // prints call stack where the promise has been created\n    console.log(err.asyncStack);\n});\n```\n\n##### `uncaughtException` event\n\nThe `uncaughtException` event is emitted when creating a promise from an array of promise, where\nonly the first encountered error is propagated through the promise chain.\n\nThe other errors they are considered uncaught and will be sinked silently.\nBy attaching a monitor you can catch those errors.\n\n```javascript\nwhen.monitor(function () {\n    return when([\n        rejectPromise(),\n        rejectPromise(),\n        rejectPromise()\n    ]);\n}).on('uncaughtException', function (err) {\n    // uncaughtException event will be emitted two times\n});\n```\n","maintainers":[{"name":"misonou","email":"misonou.mirai@gmail.com"}],"time":{"modified":"2022-06-29T01:26:48.692Z","created":"2016-08-05T04:42:47.210Z","0.0.1":"2016-08-05T04:42:47.210Z","0.0.2":"2016-08-05T04:48:59.907Z","0.0.3":"2016-08-05T06:13:07.206Z","0.1.0":"2016-08-05T17:12:19.650Z","0.1.1":"2016-08-05T17:13:47.924Z","0.1.2":"2016-08-07T12:52:13.593Z","0.1.4":"2016-08-07T16:11:16.590Z","0.1.5":"2016-08-08T07:40:22.258Z","0.1.6":"2016-08-08T08:37:56.230Z","0.1.7":"2016-08-09T04:57:38.998Z","0.1.8":"2016-08-09T08:47:40.115Z","0.1.9":"2016-08-09T14:08:02.245Z","0.1.10":"2016-08-10T06:28:40.586Z","0.1.11":"2016-08-10T08:28:50.122Z","0.1.12":"2016-08-10T12:32:28.354Z","0.1.13":"2016-08-11T10:11:38.729Z","0.1.14":"2016-08-11T10:15:51.867Z","0.1.15":"2016-08-11T14:26:45.506Z","0.1.16":"2016-08-12T09:33:16.995Z","0.1.17":"2016-08-12T11:24:29.584Z","0.1.18":"2016-08-12T13:27:00.112Z","0.2.0":"2016-08-12T14:22:37.489Z","0.2.1":"2016-08-13T16:54:32.346Z","0.2.2":"2016-08-15T04:57:41.043Z","0.2.3":"2016-08-16T15:53:26.177Z"},"keywords":["async","promise","deferred"],"author":{"name":"misonou"},"license":"MIT","readmeFilename":"README.md","description":"Promises/A+ solution with traceable fused that ease debugging to async code.","homepage":"https://github.com/misonou/node-when-traceable#readme","repository":{"type":"git","url":"git+https://github.com/misonou/node-when-traceable.git"},"bugs":{"url":"https://github.com/misonou/node-when-traceable/issues"}}