Version 0.0.6 (unstable)
npm install also
also
An accumulating set of function decorators.
Function decorators?: Coffeescript Ristretto
Examples
synchronous example with ducks
{inject} = require 'also'
ducklings = 0
ducks = 0
quark = inject.sync
beforeAll: -> ducks++
beforeEach: -> ducklings++
->
ducks: ducks
ducklings: ducklings
console.log quark quark quark quark quark quark quark()
# => { ducks: 1, ducklings: 7 }
synchronous example with node modules
nodeModules = (names) -> require name for name in names
start = inject.sync nodeModules, (crypto, zlib, net) ->
#
# ...
#
start()
asynchronous example
none. see spec
todo
- combine with Notice (hub) and run as daemon (script server for worker/drone farm)