An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# node-strip-ansi

[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fatrox%2Fsync-dotenv%2Fbadge)](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