Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ansi-style-parser

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansi-style-parser - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

package.json
{
"name": "ansi-style-parser",
"version": "1.0.0",
"description": "[![build status](https://secure.travis-ci.org/smallhelm/ansi-style-parser.png)](https://travis-ci.org/smallhelm/ansi-style-parser) [![dependency status](https://david-dm.org/smallhelm/ansi-style-parser.svg)](https://david-dm.org/smallhelm/ansi-style-parser)",
"version": "1.0.1",
"description": "Parse ansi colors and styles",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -8,3 +8,27 @@ # ansi-style-parser

```js
var c = require('chalk');
var parser = require('ansi-style-parser');
var txt = 'Some ';
txt += c.bold.green('styled ' + c.underline.bgBlack('text') + c.red('!'));
console.log(parser(txt));
```
output:
```js
[ { styles: [],
text: 'Some ' },
{ styles: [ 'bold', 'green' ],
text: 'styled ' },
{ styles: [ 'bold', 'green', 'underline', 'bgBlack' ],
text: 'text' },
{ styles: [ 'bold', 'red' ],
text: '!' } ]
```
## License
MIT
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc