Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hyperlink/bluebird-async-wrapper

Helper to migrate from Bluebird to async/await by wrapping each async method with bluebird Resolve
https://github.com/hyperlink/bluebird-async-wrapper

async-await bluebird

Last synced: 3 days ago
JSON representation

Helper to migrate from Bluebird to async/await by wrapping each async method with bluebird Resolve

Awesome Lists containing this project

README

        

# Bluebird Async Wrapper

[![Build Status](https://travis-ci.org/hyperlink/bluebird-async-wrapper.svg?branch=master)](https://travis-ci.org/hyperlink/bluebird-async-wrapper)

Helper to migrate from Bluebird to async/await by wrapping each async method with bluebird Resolve

## Install

```bash
npm install bluebird-async-wrap
```

## Usage

```javascript
const bluebirdify = require('bluebird-async-wrap');

class Test {
async asyncMethod () {
return true;
}

syncMethod () {
return true;
}
}

bluebirdify(Test);

const test = new Test();

test.asyncMethod().tap( v => console.log('this works!'));
```