# co-wrap-all

> Call co.wrap for multiple generator functions

Latest version **1.0.0** (published 2016-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install co-wrap-all
pnpm add co-wrap-all
yarn add co-wrap-all
bun add co-wrap-all
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-09-13 |
| First published | 2016-09-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Cédric Connes |
| Maintainers | connesc |
| Keywords | co, coroutine, async, wrap, all, prototype, method, promise, promisify, generator |

## Links

- npm: https://www.npmjs.com/package/co-wrap-all
- Repository: https://github.com/connesc/co-wrap-all
- Homepage: https://github.com/connesc/co-wrap-all#readme
- Issues: https://github.com/connesc/co-wrap-all/issues
- npm.io page: https://npm.io/package/co-wrap-all

## Dependencies (1)

- [co](https://npm.io/package/co.md) ^4.0.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-09-13

## README

# co-wrap-all

> Call co.wrap for multiple generator functions

This tiny helper allows to easily call `co.wrap` for multiple generator functions.  
For example:

```javascript
// Before
module.exports = {
    foo: co.wrap(foo),
    bar: co.wrap(bar)
};

// After
module.exports = wrapAll({foo, bar});
```

Also, it is very convenient for defining asynchronous methods:

```javascript
// Common
class Foo {
    * bar(arg) { /* ... */ }
    * baz(arg) { /* ... */ }
}

// Before
Foo.prototype.bar = co.wrap(Foo.prototype.bar);
Foo.prototype.baz = co.wrap(Foo.prototype.baz);

// After
wrapAll(Foo.prototype);
```

## License

[MIT](https://github.com/connesc/co-wrap-all/blob/master/LICENSE)

---
_Source: https://npm.io/package/co-wrap-all · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
