Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

support options in create-add-stream #505

Merged
merged 1 commit into from
Jan 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/api/create-add-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ const promisify = require('promisify-es6')
module.exports = (send) => {
const add = addCmd(send)

return promisify((callback) => {
return promisify((options, callback) => {
if (typeof options === 'function') {
callback = options
options = undefined
}

const tuples = []

const ds = new Duplex({ objectMode: true })
Expand Down