{"_id":"co-use","_rev":"6-776d6ba380bbaea766b9aa7899d90ab5","name":"co-use","description":"co using your choice of promise implementation","dist-tags":{"latest":"1.1.0"},"versions":{"0.1.0":{"name":"co-use","version":"0.1.0","description":"co using your choice of promise implementation","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/co-use.git"},"bugs":{"url":"https://github.com/overlookmotel/co-use/issues"},"dependencies":{},"devDependencies":{"co":"^4.6.0","bluebird":"^2.10.0","mocha":"^2.3.2","chai":"^3.2.0","jshint":"^2.8.0","istanbul":"^0.3.19","coveralls":"^2.11.4"},"keywords":["co","use","promise","choice","bluebird"],"scripts":{"test":"make test","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/co-use/raw/master/License"}],"gitHead":"c3272298307bfddaa3074f43f8df2a52b6e087fe","homepage":"https://github.com/overlookmotel/co-use","_id":"co-use@0.1.0","_shasum":"429f79dfc6d875717aae988e86ef06985a9cf21b","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"429f79dfc6d875717aae988e86ef06985a9cf21b","tarball":"https://registry.npmjs.org/co-use/-/co-use-0.1.0.tgz","integrity":"sha512-YVvlGC1U28PSjiVjXQUQib47WIf7tkEFD+qpj8i1KQ7oeTBEJ97wFAl7ZOeWjSukiMNljslsnGJdkHRA0YPs4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFdXiKq/uWOmgcEtWfLYBF1um9/eAO3m+ACVUP2orBogIgWrnOc2H7puaxLjPw3bSZ2ibt1g4dYVN2vJpzLymlHF4="}]}},"1.0.0":{"name":"co-use","version":"1.0.0","description":"co using your choice of promise implementation","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/co-use.git"},"bugs":{"url":"https://github.com/overlookmotel/co-use/issues"},"dependencies":{},"devDependencies":{"bluebird":"^2.10.0","npm-web-api":"^0.1.1","fs-extra-promise":"^0.2.1","mz":"^1.0.2","lodash":"^3.10.1","mocha":"^2.3.2","chai":"^3.2.0","jshint":"^2.8.0","istanbul":"^0.3.19","coveralls":"^2.11.4"},"keywords":["co","use","promise","choice","bluebird"],"scripts":{"build":"make build","test":"make test","cover":"make cover"},"engines":{"node":">=0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/co-use/raw/master/License"}],"gitHead":"39e4c7c3f186aa85af6f4291e21ce79153107abb","homepage":"https://github.com/overlookmotel/co-use","_id":"co-use@1.0.0","_shasum":"fe26e895bfc35dc3ecd31248e8e3c999a4a0080d","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"fe26e895bfc35dc3ecd31248e8e3c999a4a0080d","tarball":"https://registry.npmjs.org/co-use/-/co-use-1.0.0.tgz","integrity":"sha512-Jy7kDOeElKrpcxCRD1yfjTVKnvzZO8Wf6GqlBvJoXhkQxEImpjlSBhgKaZLwDy12iCsIEaSvpLWwqrNS5qPydA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHCs6vwg9on20nEHlytcCPgy7+n8H2PNNcn97IWVGwrpAiEA5n7lG9iNAL6UhDe0RxlFarvtEeqnftcMZpQcUbjmOI4="}]}},"1.0.1":{"name":"co-use","version":"1.0.1","description":"co using your choice of promise implementation","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/co-use.git"},"bugs":{"url":"https://github.com/overlookmotel/co-use/issues"},"dependencies":{},"devDependencies":{"bluebird":"^2.10.0","npm-web-api":"^0.1.1","fs-extra-promise":"^0.2.1","mz":"^1.0.2","lodash":"^3.10.1","mocha":"^2.3.2","chai":"^3.2.0","jshint":"^2.8.0","istanbul":"^0.3.19","coveralls":"^2.11.4"},"keywords":["co","use","promise","choice","bluebird"],"scripts":{"build":"make build","test":"make test","cover":"make cover"},"engines":{"node":">=0.12.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/co-use/raw/master/License"}],"gitHead":"65ac1ae85e224c214e8f41266910f2faa22ba921","homepage":"https://github.com/overlookmotel/co-use","_id":"co-use@1.0.1","_shasum":"49c4bee8ff4812ac5e830ec5dbeecc0e37389609","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"49c4bee8ff4812ac5e830ec5dbeecc0e37389609","tarball":"https://registry.npmjs.org/co-use/-/co-use-1.0.1.tgz","integrity":"sha512-CJmVFJGj6JFJVhbHzscZr0YWjZKMkSRbqhTHwUwtBMG2oj4QdizR5YbBRmzbVskOlclY6sM736pjr5k71ssWzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzGKXKXDBRwN/UGD9khDBrL07TdkiKMeOUPqrN20NTKQIgUikFv4O/0mRp4VtaQH2pzGNOiuC4Nks4EcLTDokxZHI="}]}},"1.1.0":{"name":"co-use","version":"1.1.0","description":"co using your choice of promise implementation","main":"./lib/","author":{"name":"Overlook Motel"},"repository":{"type":"git","url":"https://github.com/overlookmotel/co-use.git"},"bugs":{"url":"https://github.com/overlookmotel/co-use/issues"},"dependencies":{},"devDependencies":{"bluebird":"^2.10.0","npm-web-api":"^0.1.1","fs-extra-promise":"^0.2.1","mz":"^1.0.2","lodash":"^3.10.1","mocha":"^2.3.2","chai":"^3.2.0","jshint":"^2.8.0","istanbul":"^0.3.19","coveralls":"^2.11.4"},"keywords":["co","use","promise","choice","bluebird"],"scripts":{"build":"make build","test":"make test","cover":"make cover"},"engines":{"node":">=0.12.0"},"licenses":[{"type":"MIT","url":"http://github.com/overlookmotel/co-use/raw/master/License"}],"gitHead":"10661236f14654e753e5d29b9350e5d979578593","homepage":"https://github.com/overlookmotel/co-use","_id":"co-use@1.1.0","_shasum":"c6bb3cdf10cb735ecaa9daeeda46d725c94a4e62","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"},"maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"dist":{"shasum":"c6bb3cdf10cb735ecaa9daeeda46d725c94a4e62","tarball":"https://registry.npmjs.org/co-use/-/co-use-1.1.0.tgz","integrity":"sha512-1lVRtdywv41zQO/xvI2wU8w6oFcUYT6T84YKSxN25KN4N4Kld3scLovt8FjDmD63Cm7HtyRWHjezt+IanXmkyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICLZVYYFsI4eFa+j+ExYFsTReqmSABMzCwrtlg9Jr/oTAiAir5R7EMd4/roRgssnRpP468Ajucf38FmT4aZvroyfZw=="}]}}},"readme":"# co-use.js\n\n# co using your choice of promise implementation\n\n## Current status\n\n[![NPM version](https://img.shields.io/npm/v/co-use.svg)](https://www.npmjs.com/package/co-use)\n[![Build Status](https://img.shields.io/travis/overlookmotel/co-use/master.svg)](http://travis-ci.org/overlookmotel/co-use)\n[![Dependency Status](https://img.shields.io/david/overlookmotel/co-use.svg)](https://david-dm.org/overlookmotel/co-use)\n[![Dev dependency Status](https://img.shields.io/david/dev/overlookmotel/co-use.svg)](https://david-dm.org/overlookmotel/co-use)\n[![Coverage Status](https://img.shields.io/coveralls/overlookmotel/co-use/master.svg)](https://coveralls.io/r/overlookmotel/co-use)\n\n## What's it for?\n\n[co](https://www.npmjs.com/package/co) is a brilliant module which allows you to code async code in a sync style using generators and `yield`.\n\nFunctions which use `co` return a promise.\n\nThe problem is that the promise implementation used within `co` is the native Javascript Promise and co doesn't make it possible to use an alternative implementation, for example [bluebird](https://www.npmjs.com/package/bluebird).\n\nThis module adds an extra method `.use()` which allows the use of any promise implementation you like within `co`.\n\n## Usage\n\n### `co.use(Promise)`\n\nCreates a new instance of `co`, which uses the Promise implementation provided.\n\n```js\nvar Bluebird = require('bluebird');\nvar co = require('co-use').use(Bluebird);\n\n// now use `co` in the usual way\nvar p = co(function* () {});\n\nconsole.log(p instanceof Bluebird); // true\n```\n\n### Other methods\n\nAll other methods are the same as normal [co](https://www.npmjs.com/package/co).\n\n## Building co-use\n\nI requested that this functionality be included in `co` ([PR](https://github.com/tj/co/pull/226)) but so far it has not.\n\nSo this module is made by loading `co` and wrapping the code to add the `.use()` method. I will endeavour to update this module when new versions of co are released. The version of `co` currently used is `v4.6.0`.\n\nIf you wish to build `co-use` with the most recent version of `co`, do the following:\n\n1. Fork `co-use` from Github\n2. Go to the directory of the fork\n3. Run the following code:\n\n```\nnpm install\nnpm run build\n```\n\nPlease feel free to raise a PR with the updated build.\n\n## Tests\n\nUse `npm test` to run the tests. Use `npm run cover` to check coverage.\n\n## Changelog\n\nSee [changelog.md](https://github.com/overlookmotel/co-use/blob/master/changelog.md)\n\n## Issues\n\nIf you discover a bug, please raise an issue on Github. https://github.com/overlookmotel/co-use/issues\n\n## Contribution\n\nPull requests are very welcome. Please:\n\n* ensure all tests pass before submitting PR\n* add an entry to changelog\n* add tests for new features\n* document new functionality/API additions in README\n","maintainers":[{"name":"overlookmotel","email":"theoverlookmotel@gmail.com"}],"time":{"modified":"2022-06-13T06:23:48.595Z","created":"2015-09-14T10:04:46.100Z","0.1.0":"2015-09-14T10:04:46.100Z","1.0.0":"2015-09-18T10:00:35.383Z","1.0.1":"2015-09-19T00:13:27.787Z","1.1.0":"2015-09-19T00:44:32.756Z"},"homepage":"https://github.com/overlookmotel/co-use","keywords":["co","use","promise","choice","bluebird"],"repository":{"type":"git","url":"https://github.com/overlookmotel/co-use.git"},"author":{"name":"Overlook Motel"},"bugs":{"url":"https://github.com/overlookmotel/co-use/issues"},"readmeFilename":"README.md"}