0.1.0 • Published 10 years ago

ansi-wrap v0.1.0

Weekly downloads
2,789,905
License
MIT
Repository
github
Last release
10 years ago

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

Related projects

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.

ansi-grayansi-redansi-cyanreact-native-bluetooth2killi8n-react-native-fast-imagern-send-smsgew-nodejs-api-clientreact-native-template-rfbaseairscanairscan-examplereact-native-esc-pos-sahaab@borisovart/atol-kkt-moduledeneme323112@ntt_app/react-native-custom-notificationreact-native-covid-sdkreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-libraryreact-native-printer-brothersrn-pdf-reader-offline@infinitebrahmanuniverse/nolb-ans@everything-registry/sub-chunk-1143test-public-protestnpm_lmnvideo-multi-uploader@rstacruz/pnpmjeuxuijnf-accesscontrol-rnttlhcm-jsm2m-chartjs-plugin-crosshair@wecraftapps/react-native-use-keyboard@thismr/bitmindtest-core@thedoctor0/vuex-shared-mutations@upacyxou/react-native-draggable-flatlist@yplabs-ltd/react-native-detectoralisselisss-lab3adyen-rnansi-hiddenansi-magentaansi-bgredansi-bgwhiteansi-bgyellowansi-blueansi-boldansi-greenansi-greyansi-bgblackansi-dimansi-inverseansi-italicansi-resetansi-blackansi-bgblueansi-bgcyanansi-bggreenansi-bgmagentaansi-underlineansi-whiteansi-yellowansi-strikethrough@isogand/react-native-sliding-counter@happy-gastro/react-native-printer-module@corelmax/react-native-my2c2p-sdk@hawkingnetwork/react-native-tab-view@hbglobal/react-native-actions-shortcuts@brucearmstrong/sass-librarylayui-customdfeuk-frontenddfeuk-frontend-manual@buganto/client@benovshe/sasslibraryxys_cliwcq-vue@lofcz/sweetalert2-neutral@litedexdev/litedex-core-swap@navabi/react-native-ssl-pinning@ko-developerhong/react-native-multiple-image-picker@saad27/react-native-bottom-tab-tour@recursiveforte/sprig-flux@phong95/react-native-multiple-image-pickermiguelcostero-ng2-toastynative-apple-loginnative-kakao-loginnative-google-loginn8n-nodes-caldavnpm_qwertynpm_one_12_34_1_npm_one_1_2_3npm_one_2_2payutestingreact-native-dsphoto-modulereact-native-create-video-thumbnailreact-native-cplusreact-native-modal-progress-barreact-native-is7react-native-hlf-wrapperreact-native-flyyreact-native-myrenzbox-ipcsdk-libraryreac-native-arun-ramya-testrn-adyen-dropinrn-tm-notify
0.1.0

10 years ago