strip-ansi 2.0.0 → 2.0.1

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.
Files changed (3) hide show
  1. package/cli.js +5 -5
  2. package/package.json +1 -1
  3. package/readme.md +6 -6
package/cli.js CHANGED
@@ -34,12 +34,12 @@ if (argv.indexOf('--version') !== -1) {
34
34
  return;
35
35
  }
36
36
 
37
- if (process.stdin.isTTY) {
38
- if (!input) {
39
- help();
40
- return;
41
- }
37
+ if (!input && process.stdin.isTTY) {
38
+ help();
39
+ return;
40
+ }
42
41
 
42
+ if (input) {
43
43
  init(fs.readFileSync(input, 'utf8'));
44
44
  } else {
45
45
  process.stdin.setEncoding('utf8');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strip-ansi",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Strip ANSI escape codes",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/strip-ansi",
package/readme.md CHANGED
@@ -15,7 +15,7 @@ $ npm install --save strip-ansi
15
15
  ```js
16
16
  var stripAnsi = require('strip-ansi');
17
17
 
18
- stripAnsi('\x1b[4mcake\x1b[0m');
18
+ stripAnsi('\u001b[4mcake\u001b[0m');
19
19
  //=> 'cake'
20
20
  ```
21
21
 
@@ -29,12 +29,12 @@ $ npm install --global strip-ansi
29
29
  ```sh
30
30
  $ strip-ansi --help
31
31
 
32
- Usage
33
- $ strip-ansi <input-file> > <output-file>
34
- $ cat <input-file> | strip-ansi > <output-file>
32
+ Usage
33
+ strip-ansi <input-file> > <output-file>
34
+ cat <input-file> | strip-ansi > <output-file>
35
35
 
36
- Example
37
- $ strip-ansi unicorn.txt > unicorn-stripped.txt
36
+ Example
37
+ strip-ansi unicorn.txt > unicorn-stripped.txt
38
38
  ```
39
39
 
40
40