UNPKG

363 BJavaScriptView Raw
1var combine = require('../')
2
3var blobs = {
4 gives: {blobs: {add: true}},
5 create: function () {
6 return {blobs: {add: function (i) { console.log(i) }}}
7 }
8}
9
10var image = {
11 needs: {blobs: {add: 'first'}},
12 gives: 'start',
13 create: function (api) {
14 return function (n) {
15 api.blobs.add(n)
16 }
17 }
18}
19
20combine([blobs, image]).start[0]('hello')
21