Socket
Socket
Sign inDemoInstall

ansi-wrap

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ansi-wrap

Create ansi colors by passing the open and close codes.


Version published
Weekly downloads
1.9M
decreased by-12.48%
Maintainers
1
Install size
5.49 kB
Created
Weekly downloads
 

Readme

Source

ansi-wrap NPM version

Create ansi colors by passing the 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[45mfoo\u001b[49m'

Which prints out...

screen shot 2015-05-21 at 8 28 32 pm

This is used in these projects:

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 21, 2015.

FAQs

Last updated on 22 May 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc