0.0.3 • Published 8 years ago

console-style-parser v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Console Style Parser

Build Status npm npm

A simple module for parsing console.log colors to an array of objects.

Installation

npm install console-style-parser --save

Usage

const CSP = require('console-style-parser');

const egLog = ['%cExample %coutput with %c%s', 'color: red', 'color: green', 'color: blue', 'colors!'];
const parsedLog = CSP.parse(egLog);

/*
 [ 
	{ content: 'Example ', color: 'red' },
  	{ content: 'output with ', color: 'green' },
  	{ content: 'colors!', color: 'blue' } 
  ]
 */