0.1.1 • Published 7 years ago

@bhoos/promisify v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

A simple promisification utility with native promises

Installation

$ yarn add @bhoos/promisify

Usage

import promisify from '@bhoos/promisify';

// to promisify all from redis client
const client = redis.createClient();
const clientPromised = promisify(client);

// Use without callback methods
const g = await clientPromised.hgetall(key);

// Can also promisify single function
const promised = promisify(function(cb) { ... });
const res = await promised();