arbitrary-promise
ArbitraryPromise is a simple Promise library that allows you to make your own arbitrarily named resolve/then functions.
Examples
Go with a classic:
const promise = 'resolve' 'then' promisepromise
-> Mathematical!
Or, spice it up with what this library provides, customization!
const promise = 'handleData' 'onData' promisepromise
-> Whoa! Algebraic!
Of course, the promise will also work in reverse order, it being a promise and all:
const promise = 'handleData' 'onData' promisepromise
-> Whoa! Algebraic!
Unless, that is, you don't want it to:
const promise = 'handleData' 'onData' false promisepromise
-> Zilch.
Check out the tests for all the info, of which there is not much more than what you already know :)