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

Commit 61fda39

Browse files
pgtedaviddias
authored andcommitted
support options in create-add-stream (#505)
1 parent d807c98 commit 61fda39

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/api/create-add-stream.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ const promisify = require('promisify-es6')
77
module.exports = (send) => {
88
const add = addCmd(send)
99

10-
return promisify((callback) => {
10+
return promisify((options, callback) => {
11+
if (typeof options === 'function') {
12+
callback = options
13+
options = undefined
14+
}
15+
1116
const tuples = []
1217

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

0 commit comments

Comments
 (0)