@trenskow/print 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +2 -1
- package/package.json +2 -1
package/lib/index.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// See license in LICENSE.
|
|
7
7
|
//
|
|
8
8
|
|
|
9
|
+
import NullStream from '@trenskow/null-stream';
|
|
9
10
|
import keyd from 'keyd';
|
|
10
11
|
|
|
11
12
|
let ttyColumn = 0;
|
|
@@ -99,7 +100,7 @@ const printer = (stream) => {
|
|
|
99
100
|
|
|
100
101
|
Object.defineProperty(print, 'tty', {
|
|
101
102
|
get: () => {
|
|
102
|
-
return stream.isTTY ? print : ()
|
|
103
|
+
return stream.isTTY ? print : printer(new NullStream());
|
|
103
104
|
}
|
|
104
105
|
});
|
|
105
106
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trenskow/print",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A simple package for printing to the console (or other streams).",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"globals": "^15.14.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@trenskow/null-stream": "^0.1.1",
|
|
33
34
|
"keyd": "^2.1.17"
|
|
34
35
|
}
|
|
35
36
|
}
|