Skip to content

Commit

Permalink
PromiseDuplex object is instance of PromiseWritable
Browse files Browse the repository at this point in the history
  • Loading branch information
dex4er committed Oct 1, 2017
1 parent 2796a4a commit 7ce0a8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## v1.1.0 2017-10-01

* PromiseDuplex object is instance of PromiseWritable.

## v1.0.0 2017-09-29

* Exports also as a class and namespace and the default.
Expand Down
4 changes: 4 additions & 0 deletions lib/promise-writable.js
Expand Up @@ -9,6 +9,10 @@ class PromiseWritable {
this._finished = false
}

static [Symbol.hasInstance] (instance) {
return !!instance._isPromiseDuplex
}

write (chunk, encoding) {
const stream = this.stream

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "promise-writable",
"version": "1.0.0",
"version": "1.1.0",
"description": "Return promise for writable stream",
"main": "lib/promise-writable.js",
"typings": "lib/promise-writable.d.ts",
Expand Down

0 comments on commit 7ce0a8b

Please sign in to comment.