File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "tabWidth": 2,
5
+ "useTabs": false,
6
+ "printWidth": 80,
7
+ "bracketSpacing": true,
8
+ "arrowParens": "avoid"
9
+ }
Original file line number Diff line number Diff line change 15
15
"utility" : " ./shims/utility.js" ,
16
16
"crypto" : " ./shims/crypto/crypto.js" ,
17
17
"fs" : false ,
18
- "child_process" : false
18
+ "child_process" : false ,
19
+ "is-type-of" : " ./shims/is-type-of.js"
19
20
},
20
21
"scripts" : {
21
22
"build-change-log" : " standard-version" ,
Original file line number Diff line number Diff line change
1
+ const { Stream } = require ( 'stream' ) ;
2
+ const isArray = require ( '../lib/common/utils/isArray' ) ;
3
+
4
+ module . exports . string = function isString ( obj ) {
5
+ return typeof obj === 'string' ;
6
+ } ;
7
+
8
+ module . exports . array = isArray ;
9
+
10
+ module . exports . buffer = Buffer . isBuffer ;
11
+
12
+ function isStream ( obj ) {
13
+ return obj instanceof Stream ;
14
+ }
15
+
16
+ module . exports . writableStream = function isWritableStream ( obj ) {
17
+ return (
18
+ isStream ( obj ) &&
19
+ typeof obj . _write === 'function' &&
20
+ typeof obj . _writableState === 'object'
21
+ ) ;
22
+ } ;
You can’t perform that action at this time.
0 commit comments