jackdclark / five

Gives you five
https://five.js.org/
MIT License
1.52k stars 251 forks source link

complex #5

Open Joezo opened 10 years ago

Joezo commented 10 years ago

As a user of five I would like to get five in a complex way So that I can use five and feel better about it

please implement five.complex()

shackpank commented 10 years ago

maybe wrapping callbacks, promises and generators around everything this module can currently return would be a good way to do this

jneubrand commented 8 years ago

@Joezo may I suggest this ES6, promise-based one-liner as a wrapper for five.complex()? As we all know, added and unnecessary complexity is always a good thing™, so you may like this.

new Promise((ok, barf) => ok(five.complex.call(() => {})))

Test with:

new Promise((ok, barf) => ok(five.complex.call(() => {}))).then(console.log)