https://github.com/electerm/node-strip-ansi
A port for strip-ansi to work with nodejs env
https://github.com/electerm/node-strip-ansi
Last synced: 6 months ago
JSON representation
A port for strip-ansi to work with nodejs env
- Host: GitHub
- URL: https://github.com/electerm/node-strip-ansi
- Owner: electerm
- License: mit
- Created: 2021-09-16T10:07:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-16T11:03:46.000Z (over 4 years ago)
- Last Synced: 2024-05-01T11:34:12.431Z (almost 2 years ago)
- Language: JavaScript
- Size: 95.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-strip-ansi
[](https://github.com/@electerm/strip-ansi/actions)
A port for [strip-ansi](https://github.com/chalk/strip-ansi) to work with nodejs env, so user can use `require` to use it
## Use
```bash
npm i @electerm/strip-ansi
```
```js
const stripAnsi = require('strip-ansi').default;
stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
//=> 'Click'
```
## License
MIT