https://github.com/catdad/unstyle
:scissors: unstyle CLI output
https://github.com/catdad/unstyle
cli npm stream
Last synced: about 2 months ago
JSON representation
:scissors: unstyle CLI output
- Host: GitHub
- URL: https://github.com/catdad/unstyle
- Owner: catdad
- Created: 2016-05-12T21:35:05.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-07T01:52:54.000Z (almost 8 years ago)
- Last Synced: 2025-03-17T03:47:18.952Z (3 months ago)
- Topics: cli, npm, stream
- Language: JavaScript
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unstyle
[![Build][1]][2]
[![Test Coverage][3]][4]
[![Code Climate][5]][6]
[![Downloads][7]][8]
[![Version][9]][8]
[![Dependency Status][10]][11][1]: https://travis-ci.org/catdad/unstyle.svg?branch=master
[2]: https://travis-ci.org/catdad/unstyle[3]: https://codeclimate.com/github/catdad/unstyle/badges/coverage.svg
[4]: https://codeclimate.com/github/catdad/unstyle/coverage[5]: https://codeclimate.com/github/catdad/unstyle/badges/gpa.svg
[6]: https://codeclimate.com/github/catdad/unstyle[7]: https://img.shields.io/npm/dm/unstyle.svg
[8]: https://www.npmjs.com/package/unstyle
[9]: https://img.shields.io/npm/v/unstyle.svg[10]: https://david-dm.org/catdad/unstyle.svg
[11]: https://david-dm.org/catdad/unstyleSometimes, really great CLIs output really colorful content, to help you easily take in and unserstand the output at a glance. And sometimes, they don't provide a way to easily get rid of the colors. And sometimes, really great CLIs use third-party tools that output pretty colors, and forget to pass through the option to print plain text. And sometimes, you just don't care and you want those colors gone. And if all of those times are right now, then you have come to the right place.
## Install
```bash
npm install --global unstyle
```## Profit
```bash
colorful-command | unstyle > output.txt
```Want to capture stderr as well?
```bash
colorful-command 2>&1 | unstyle
```## But I just want to do it inside my app.
```javascript
var unstyle = require('unstyle');
inputStream.pipe(unstyle()).pipe(outputStream);
```## What are streams? I have a string.
```javascript
var unstyle = require('unstyle');
var cleanString = unstyle.string(dirtyString);
```