Closed yoshuawuyts closed 9 years ago
Removes the need for a large up-front object of requirements
possibly leverage the .on('foo:bar:bin:baz', () =>)
shiz; or just .on('foo:bar', () =>)
const barracks = require('barracks')
const d = barracks()
d.on('courses:get', () => console.log('whoop!')
d.on('courses:post', (ev, data, wait) => wait(['foobar', 'binbaz']))
d('courses:post', {my: 'data'})
this
could also turn wait
into an object with yieldable values. E.g. going the co
route
Or just make wait
return a Promise, so it can be yielded through Babel. Mwhehhhhh
Should also be infinitely nestable, like with wayfarer
.
We should probably leverage mounting semantics as outlined in https://github.com/yoshuawuyts/wayfarer/issues/12, making this the data transport counterpart to wayfarer
.
Closed in 138aeac
not recommending to do things dynamically, but being able to pass around an instance is neat.