Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmueller committed Aug 2, 2014
1 parent 9c862aa commit 43b26ad
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,34 @@

allow generators functions to accept callbacks

## License
## Example

```js
var fn = unyield(function *() {
return yield wait(100);
});

fn(function(err, ms) {
assert(!err)
assert(ms >= 100);
done();
});
```

## API

### unyield(gen)

Allow a generator to either be yieldable or be a callback function. Passes arguments and context through.

## Test

```
npm install
make test
```

## License

(The MIT License)

Expand All @@ -26,4 +53,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit 43b26ad

Please sign in to comment.