strip-ansi 3.0.1 → 4.0.0

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 (4) hide show
  1. package/index.js +2 -4
  2. package/license +4 -16
  3. package/package.json +3 -8
  4. package/readme.md +12 -6
package/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  'use strict';
2
- var ansiRegex = require('ansi-regex')();
2
+ const ansiRegex = require('ansi-regex');
3
3
 
4
- module.exports = function (str) {
5
- return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
6
- };
4
+ module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
package/license CHANGED
@@ -1,21 +1,9 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
3
  Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11
6
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
8
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strip-ansi",
3
- "version": "3.0.1",
3
+ "version": "4.0.0",
4
4
  "description": "Strip ANSI escape codes",
5
5
  "license": "MIT",
6
6
  "repository": "chalk/strip-ansi",
@@ -9,13 +9,8 @@
9
9
  "email": "sindresorhus@gmail.com",
10
10
  "url": "sindresorhus.com"
11
11
  },
12
- "maintainers": [
13
- "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
14
- "Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)",
15
- "JD Ballard <i.am.qix@gmail.com> (github.com/qix-)"
16
- ],
17
12
  "engines": {
18
- "node": ">=0.10.0"
13
+ "node": ">=4"
19
14
  },
20
15
  "scripts": {
21
16
  "test": "xo && ava"
@@ -48,7 +43,7 @@
48
43
  "text"
49
44
  ],
50
45
  "dependencies": {
51
- "ansi-regex": "^2.0.0"
46
+ "ansi-regex": "^3.0.0"
52
47
  },
53
48
  "devDependencies": {
54
49
  "ava": "*",
package/readme.md CHANGED
@@ -1,22 +1,22 @@
1
1
  # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
2
2
 
3
- > Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
3
+ > Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
4
4
 
5
5
 
6
6
  ## Install
7
7
 
8
8
  ```
9
- $ npm install --save strip-ansi
9
+ $ npm install strip-ansi
10
10
  ```
11
11
 
12
12
 
13
13
  ## Usage
14
14
 
15
15
  ```js
16
- var stripAnsi = require('strip-ansi');
16
+ const stripAnsi = require('strip-ansi');
17
17
 
18
- stripAnsi('\u001b[4mcake\u001b[0m');
19
- //=> 'cake'
18
+ stripAnsi('\u001B[4mUnicorn\u001B[0m');
19
+ //=> 'Unicorn'
20
20
  ```
21
21
 
22
22
 
@@ -28,6 +28,12 @@ stripAnsi('\u001b[4mcake\u001b[0m');
28
28
  - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
29
29
 
30
30
 
31
+ ## Maintainers
32
+
33
+ - [Sindre Sorhus](https://github.com/sindresorhus)
34
+ - [Josh Junon](https://github.com/qix-)
35
+
36
+
31
37
  ## License
32
38
 
33
- MIT © [Sindre Sorhus](http://sindresorhus.com)
39
+ MIT