1
我想寫類似:Higland.js:包裝toCallback到承諾
const Promise = require('bluebird')
const H = require('highland')
Promise.fromCallback(
H([1, 2, 3]).toCallback
).then(function(val) {
expect(val).eql(1, 2, 3)
})
但我看到了一個錯誤:
TypeError: this.consume is not a function
如何正確結合上下文的情況下
很酷的答案,THX! – kharandziuk