UnlessAsync
Async unless
conditional flow inspired by Ruby.
Node 6+
Why?
Because programming is fun, and implementing what you think you know shows you what you've yet to learn.
Installation
npm i -S unless-async
Usage
const unless = ; const foo = false;; const bar = true;; ; const isAdmin = User; return ;
API
unless(
Promise<any>|boolean condition,
function action
) -> Promise
Creates a promise that is resolved with the given action function when false, otherwise resolves undefined.
Test
npm test
License
MIT