{"_id":"simple-promise","_rev":"24-f9903a8626cbd5cda00960648d1c179a","name":"simple-promise","description":"Simple and fast promise factory for Node and web apps.","dist-tags":{"latest":"1.3.4"},"versions":{"1.0.0":{"name":"simple-promise","version":"1.0.0","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","_id":"simple-promise@1.0.0","dist":{"shasum":"e33b09ff2d84f96b61fb16b9690ffec54513c328","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.0.0.tgz","integrity":"sha512-oWJgFvkfTlVGa6FprTGH09oi6gjnaIc2PO/ytIQHKR4jB4JTryoSuPrra8n8ad8ytRyKxJpcCN9xzNo12/hbUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLc1teUGpMwzxaNkBLHAeEE941HRvtXaJMNCfrDZVKggIhAOM6jlu8CuUrfBj/Lg4+oDuX3npto80W3DkOh9LXU1tc"}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}]},"1.0.1":{"name":"simple-promise","version":"1.0.1","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"_id":"simple-promise@1.0.1","dist":{"shasum":"eb253046cc2ac26a79652d1f12eb0408ad1b8503","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.0.1.tgz","integrity":"sha512-2ut9JAWUtH4dLkLjLE5pxh8qDHrqElNo1/k5qWVCLfArrMiLsanSzk5VUQ2Ab6kd9wsR7zceuzP3KLZDnRiKFQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHlTV6fT8+HaPUweG6kLPP+vV/DA/SEBSBq6qhbr5OCQAiEAz4SM3cte5sB9Ak51hYs7gA7dWyTDwpaUy3y8QBf74J4="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}]},"1.0.2":{"name":"simple-promise","version":"1.0.2","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"_id":"simple-promise@1.0.2","dist":{"shasum":"7babdcfb8f91528123ca880620456ed7fbfd0ff1","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.0.2.tgz","integrity":"sha512-hMCp9AiKYIg0GVG8meUMy25EnyUxB3ICx6K/inEwZsIZK8aiKq8OHi8EGHkLYK3/GqYvLQxSifOR28fefr+d/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGYXQzKdFlcOA2bclD1/fp2/8pJn2yFBiHOFoWVEz4hUAiEAzKl3YjQYOWFGby27ZmmfjbjzTEAm2iL+oUmERq7m+r8="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}]},"1.1.1":{"name":"simple-promise","version":"1.1.1","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"dependencies":{"underscore":"^1.6.0"},"gitHead":"a4facf80da8bdf769abb78a45e1dddb5e36dbe5a","_id":"simple-promise@1.1.1","_shasum":"180b173a4bff2035c2a22f32632517ba65b6c4ed","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}],"dist":{"shasum":"180b173a4bff2035c2a22f32632517ba65b6c4ed","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.1.1.tgz","integrity":"sha512-8E9FOAJtXvuNjSB72U/lOKc/bdaF8vpzp0w0RPBoRvPDB2J5lMqBjwVi8MMill09Df/DMX8tjIZ055cmaeVPEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGmUCgYevWBsMYw79MLNmLA727/vAd3RoViEc1oLGTRKAiB9WgyNCB6djG6BKzZjWM8Uk0r7s0wzzfALTjiptY/oIg=="}]}},"1.2.0":{"name":"simple-promise","version":"1.2.0","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"dependencies":{"underscore":"^1.6.0"},"gitHead":"3702e0337e197815c5d4e9f4d480aa89f262aa4d","_id":"simple-promise@1.2.0","_shasum":"52946c0a6d7d6bcfbba663b6ee52c8a7d64ecc04","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}],"dist":{"shasum":"52946c0a6d7d6bcfbba663b6ee52c8a7d64ecc04","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.2.0.tgz","integrity":"sha512-u3gGbn0AfFw2pdxgin0hA5kmb1axmgYYruHJepB3U1q/k7TyF2UqHcafyN7+VYQBQ0tsGLSeP6+3IH2/dID31Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnbIHvvNbZjKJnI/Q27C56hBiK1b4KQZEJO0RHhFz/8QIgc3U4ZD2aDQ+KKoPp1MFzMkudgIx5Ji72wGJjDB9iZ90="}]}},"1.2.1":{"name":"simple-promise","version":"1.2.1","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"dependencies":{"underscore":"^1.6.0"},"gitHead":"fc9881312a12db3285cb856361aa4ee61e0f06d0","_id":"simple-promise@1.2.1","_shasum":"317a606220161f8626fe270b2d87009bb37c833b","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}],"dist":{"shasum":"317a606220161f8626fe270b2d87009bb37c833b","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.2.1.tgz","integrity":"sha512-tBivIpOyDXLKtTcQF6IpnKc5LZvffa/yM9Tl14AA+mzLFiCPN8/WuNyi5x9iB+s/b6YvCyCtX4MCriEGqq/lnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDIO0vABkLLVaC/4OEfGGPUSI5xV3kP+s7H6IbPQn64QIhAL39ddU8PMdlRWxZ6Qfpq8gUQj8ht2ByIMs5r+lY7CaI"}]}},"1.2.3":{"name":"simple-promise","version":"1.2.3","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"dependencies":{"underscore":"^1.6.0"},"gitHead":"c8ceb300d60a13258bbb4d4a495aa8b83e3e600c","_id":"simple-promise@1.2.3","_shasum":"0b167f78970338d8a61e22acf13cb061316a4059","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}],"dist":{"shasum":"0b167f78970338d8a61e22acf13cb061316a4059","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.2.3.tgz","integrity":"sha512-iEC6CQHNE3sKfqJ3NuP3vIhGErfbyY3h9x03QExUPUdWiPyVej++RHOMw/cvvbT5l2EfR2IsQZJPJt5bXwTHkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEP/ysJgaia7rOXeI/Ous6RaZOmB1mz51/nWA4ZMwFpbAiEAvh18hIh4A3sYXqZNu7pSwbawXCriiGsJB1fc+FBYVCQ="}]}},"1.3.0":{"name":"simple-promise","version":"1.3.0","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"dependencies":{"underscore":"^1.6.0"},"gitHead":"d957d89c9afe21e6cd33d52166049ba85241085c","_id":"simple-promise@1.3.0","_shasum":"561bc6a1b779e283a48e7d40d4e1910e55792f8c","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}],"dist":{"shasum":"561bc6a1b779e283a48e7d40d4e1910e55792f8c","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.3.0.tgz","integrity":"sha512-bhmgdEJ+xlkAousGvdPJwM/D4DyXlUBql3ebygnr+d9a2Zby2rOQ2QP8c7ANDwofE08N6GK272zlRqTFPAUQhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFOXOWJTRzULRoAC+IQW4orOmUMFAmYAmw96TphpjzJCAiEAtopQLoF+w8z7EAJFleCrg4yP7jtp6AicVOescV8+BoE="}]}},"1.3.1":{"name":"simple-promise","version":"1.3.1","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"dependencies":{"underscore":"^1.6.0"},"gitHead":"5bf1c0874f4e3359200acee68edb5771812b0e90","_id":"simple-promise@1.3.1","_shasum":"ed49470f54bf80bb3fa9433449144ed35aa7a935","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}],"dist":{"shasum":"ed49470f54bf80bb3fa9433449144ed35aa7a935","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.3.1.tgz","integrity":"sha512-LyshrMUljgUCS76qx1WW6bc3ThNjTR1BNvxsRUkcPMMDxT0NPawHKsdDRONSX5x4hvLq3TDGGamN/h+l7AIeWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDr16Wtk/uKaf/Pm6LDiqFSNXDsQ29rJuuO/XKEEEMUKgIgaqKzFhjLUNSeFUQdwjvcR8l1kckezYHXYfhyXF9/dno="}]}},"1.3.2":{"name":"simple-promise","version":"1.3.2","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"dependencies":{"underscore":"^1.6.0"},"gitHead":"676c4448a14468d581a73e4a1fe3013a8c56fa2c","_id":"simple-promise@1.3.2","_shasum":"17bffb8a79600be28594d46f720b03f37209864a","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}],"dist":{"shasum":"17bffb8a79600be28594d46f720b03f37209864a","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.3.2.tgz","integrity":"sha512-kKqg+5UXef1J+ikHtdLxqyK0a2MKnaB22cjm4OGX4n2sYKgBJaxd1shG1lZrickQyjmTmVyhe/mCN9iV+zkuKg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRhLf/8SSpxFl6iBGXuANnEJQQQuqloX2mk5YMmgfilAIgfz72jnfmuGEg6MlTPP1ZST9fuiVfUh4DICqVnEz3hZc="}]}},"1.3.4":{"name":"simple-promise","version":"1.3.4","description":"Simple and fast promise factory for Node and web apps.","main":"src/promise.js","scripts":{"test":"jasmine-node tests"},"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"license":"MIT","bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"homepage":"https://github.com/cobbdb/simple-promise","devDependencies":{"jasmine-node":"~1.14.5"},"dependencies":{"underscore":"^1.6.0"},"gitHead":"378ff7a4e9152741ebc8d5e4dbb9fbf3167545a7","_id":"simple-promise@1.3.4","_shasum":"ea49a147365ae51a830e66b3e2182aece39cdd1a","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"cobbdb","email":"cobbdb@gmail.com"},"maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}],"dist":{"shasum":"ea49a147365ae51a830e66b3e2182aece39cdd1a","tarball":"https://registry.npmjs.org/simple-promise/-/simple-promise-1.3.4.tgz","integrity":"sha512-SStV1k3afwnU11lvLNnAG6IPjDy+5dDNnnIBZyWhPcBBFcw0pAhA1fj75tPEEGW2B+Y5zViy86Uv6019U5kNbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgWF/nT07rJZi/vPALO+4G/K+1ZbofZP8ghVXDRfXCuAIhANIGhxLeC/+yNUL5wkIQJlH+c/Sp8FIGtukj71xnyr6P"}]}}},"readme":"# simple-promise [![Bower version](https://badge.fury.io/bo/simple-promise.svg)](http://badge.fury.io/bo/simple-promise) [![NPM version](https://badge.fury.io/js/simple-promise.svg)](http://badge.fury.io/js/simple-promise)\n\nSimple and fast promise factory for Node and web apps.\n\n    $ bower install simple-promise\n    $ npm install simple-promise\n\n-------------\n## API\n\n#### promise(task)\n- **Param** task *Function* Entry point of the promise.\n- **Returns** *Function*\n- `var say = promise(function (msg, name) {`\n\n  #### task([{args}], done)\n  - **Param** [args] *Any* Task arguments.\n  - **Param** done *Function* Call to signal end of task.\n  - **Returns** *Any* Return value of `task`.\n  - `var say = promise(function (msg, name, done) {`\n\n    #### done([{args}])\n    - **Param** [args] *Any* Done arguments.\n    - **Returns** *Any* Return value of `then` contract.*\n    - `var thenResult = done('abc123');`\n\n#### promise.then(contract)\n- **Param** contract *Function* Called on task's `done`.\n- **Returns** *Any* Return value of `then` contract.\n- `say.then(function (async, sync, msg, name) {`\n\n  #### contract([{async}], [sync], {[args]})\n  - **Param** async *Any* Call argument(s) of task's `done`.\n  - **Param** sync *Any* Return value of `task`.\n  - **Returns** *Any* Return value of `then` contract.\n  - `say.then(function (async1, async2, sync, msg, name) {`\n\n#### promise.error(contract)\n- **Param** contract *Function* Called on `task` error.\n- **Returns** *Any* Return value of `error` contract.\n- `say.error(function (err, msg, name) {`\n\n  #### contract(err, {[args]})\n  - **Param** err *Error* Error object thrown in `task`.\n  - **Param** [args] *Any* All `task` arguments.\n  - **Returns** *Any* Return value of `error` contract.\n  - `say.error(function (err, msg, name) {`\n\n-------------\n## Code Samples\nHere are some quick code samples to help you get started.\n\n### Load the library\nSimple-Promise is a CommonJS library, so the require statement can\nbe used for both Node **and** web applications!\n\n    var promise = require('simple-promise');\n\n#### Creating a new promise\nAt their core, promises look and behave like a normal function.\n\n    var greet = promise(function (name, done) {\n        console.log('Hello %s!', name);\n        done();\n    });\n\n#### Attach a success behavior\nCallbacks can be a hassle and quickly create a mess. Tackle the common usage of callbacks with\na promise instead. The `then` function is optional and is called immediately after successful\ncompletion of the promise.\n\n    greet.then(function (name) {\n        console.log('Farewell %s!', name);\n    });\n\n#### Attach an error behavior\nSometimes things don't go as expected. Attach an optional error behavior to handle any\nproblems.\n\n    greet.error(function (err, name) {\n        console.log('%s caused an error!', name);\n        console.error('%s : %s', err.name, err.message);\n    });\n\n#### Chain your method calls\nEach method supports chaining for quick and clean instantiation.\n\n    promise(function (done) {\n        console.log('First, this happened.');\n        done();\n    }).then(function () {\n        console.log('Then, this happened.');\n    }).error(function () {\n        console.error(\"Hopefully this won't happen to you.\");\n    });\n\n#### Immediately invoke your promise\nYou can invoke immediately with the `run` method or parens.\n\n    var go = promise(function (greeting, name) {\n        console.log('%s %s!', greeting, name);\n    });\n    go.run('Hello', 'World');\n    // ~ or ~ like this:\n    go('Hello', 'World');\n\n#### Collect all return values\nReturn values are passed along the chain so you can use them\nhowever you need.\n\n    var result;\n    promise(function (name, done) {\n        // Some async action.\n        setTimeout(function () {\n            result = done();\n        }, 100);\n        return 'Hello!';\n    }).then(function (sync, name) {\n        return name + ' says ' + sync;\n    }).run('Tom');\n\n    var result = promise(function (name) {\n        throw Error('Hello!');\n    }).error(function (err, name) {\n        return name + ' says ' + err.message;\n    }).run('Tom');\n\nBoth of these blocks will eventually output the same string;\n`result` will equal `Tom says Hello!`\n\n---------\n* See: http://github.com/cobbdb/simple-promise\n* License: MIT\n","maintainers":[{"name":"cobbdb","email":"cobbdb@gmail.com"}],"time":{"modified":"2022-06-26T19:48:04.357Z","created":"2014-07-17T04:54:29.506Z","1.0.0":"2014-07-17T04:54:29.506Z","1.0.1":"2014-07-17T05:45:52.808Z","1.0.2":"2014-07-17T06:02:09.643Z","1.1.1":"2014-07-20T09:02:38.915Z","1.2.0":"2014-07-21T03:40:37.820Z","1.2.1":"2014-07-21T03:45:32.488Z","1.2.3":"2014-07-22T05:24:06.153Z","1.3.0":"2014-07-22T06:34:36.990Z","1.3.1":"2014-07-22T06:37:31.229Z","1.3.2":"2014-07-23T07:16:57.884Z","1.3.4":"2014-07-23T07:40:29.600Z"},"homepage":"https://github.com/cobbdb/simple-promise","keywords":["Promise","simple","webapp","dep","quick","bare","minimal","callback","attach"],"repository":{"type":"git","url":"git://github.com/cobbdb/simple-promise.git"},"author":{"name":"Dan Cobb","email":"cobbdb@gmail.com","url":"http://www.github.com/cobbdb"},"bugs":{"url":"https://github.com/cobbdb/simple-promise/issues"},"license":"MIT","readmeFilename":"readme.md"}