ansi-wrap ![NPM version](https://camo.githubusercontent.com/ca2a6467c2bd3a8fcc0205600e848893050bf0f32eefebbe20a4f97d5b4ed941/68747470733a2f2f62616467652e667572792e696f2f6a732f616e73692d777261702e737667)
Create ansi colors by passing open and close codes.
Install
Install with npm
$ npm i ansi-wrap --save
Usage
var wrap = require('ansi-wrap');
Example
Pass codes for ansi magenta background:
console.log(wrap(45, 49, 'This is a message...'));
//=> '\u001b[45mThis is a message...\u001b[49m'
Which prints out...
Related projects
This is used in these projects:
- ansi-reset
- ansi-bold
- ansi-dim
- ansi-italic
- ansi-underline
- ansi-inverse
- ansi-hidden
- ansi-strikethrough
- ansi-black
- ansi-red
- ansi-green
- ansi-yellow
- ansi-blue
- ansi-magenta
- ansi-cyan
- ansi-white
- ansi-gray
- ansi-grey
- ansi-bgblack
- ansi-bgred
- ansi-bggreen
- ansi-bgyellow
- ansi-bgblue
- ansi-bgmagenta
- ansi-bgcyan
- ansi-bgwhite
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on May 24, 2015.