Skip to content

johannes-scharlach/ensure-bluebird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ensureBluebird

Ensure that all returned promises are bluebird Promises.

Usage

On whole objects

const ensureBluebird = require("ensure-bluebird")
// ensure all top-level methods return bluebird Promises (if they are returning any promise)
const fse = ensureBluebird(require("fs-extra"))

Or on individual functions

const ensureBluebird = require("ensure-bluebird")
const copy = ensureBluebird(require("fs-extra").copy)

If the function doesn't return a promise previously, it won't return a promise afterwards. Also static properties are not affected by applying ensureBluebird.

About

Ensure that all returned promises are bluebird promises

Resources

Stars

Watchers

Forks

Packages

No packages published