Helps you write libraries that accept both promises and callbacks.

added by bpwndaddy
6/19/2015 3:57:05 PM

1 Kicks, 266 Views

promise-breaker makes it easy to write functions that will accept an optional callback, or return a Promise if a callback is not provided. You can use callbacks or Promises in your implementation, and callers can call with either a callback or expect a Promise. It's a library that makes it easy to write libraries for others.