Skip to content

Commit

Permalink
pdev:set
Browse files Browse the repository at this point in the history
  • Loading branch information
ORESoftware committed Apr 19, 2018
1 parent 7206bb0 commit 8e3b20b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/is-x.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
function isBasic(stream) {
return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function';
return stream && typeof stream.pipe === 'function';
}
function isWritable(stream) {
return isBasic(stream) && stream.writable !== false && typeof stream._write === 'function' &&
typeof stream._writableState === 'object';
return isBasic(stream)
&& stream.writable !== false
&& typeof stream._write === 'function'
&& typeof stream._writableState === 'object';
}
function IsReadable(stream) {
return isBasic(stream) && stream.readable !== false && typeof stream._read === 'function' &&
Expand Down

0 comments on commit 8e3b20b

Please sign in to comment.