@njakob/terminus

1.0.1 • Public • Published

terminus Build Status ESLint Config

Universal terminal helper inspired by Chalk.

Features

  • Universal
  • Partial Flowtype support
  • Tagged template literals based

Installation

NPM

With NPM:

$ npm install @njakob/terminus

With Yarn:

$ yarn add @njakob/terminus

Usage

Terminus uses tagged template literals in order to output colors in both your Node.js and browser applications.

import Terminus from '@njakob/terminus';

const term = new Terminus();

term.log`Stuff to ${term.red('log')} with some ${term.bold.blue('colors')}`;

Colors

  • term.log`${term.black('black')}`
  • term.log`${term.red('red')}`
  • term.log`${term.green('green')}`
  • term.log`${term.yellow('yellow')}`
  • term.log`${term.blue('blue')}`
  • term.log`${term.cyan('cyan')}`
  • term.log`${term.magenta('magenta')}`
  • term.log`${term.white('white')}`
  • term.log`${term.gray('gray')}`

Backgrounds

  • term.log`${term.bgBlack('black')}`
  • term.log`${term.bgRed('red')}`
  • term.log`${term.bgGreen('green')}`
  • term.log`${term.bgYellow('yellow')}`
  • term.log`${term.bgBlue('blue')}`
  • term.log`${term.bgCyan('cyan')}`
  • term.log`${term.bgMagenta('magenta')}`
  • term.log`${term.bgWhite('white')}`

Modifiers

  • term.log`${term.bold('bold')}`
  • term.log`${term.dim('dim')}`
  • term.log`${term.italic('italic')}`
  • term.log`${term.inverse('inverse')}`
  • term.log`${term.hidden('hidden')}`
  • term.log`${term.strikethrough('strikethrough')}`
  • term.log`${term.underline('underline')}`

Licences

njakob/terminus is licensed under the MIT License.

Package Sidebar

Install

npm i @njakob/terminus

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • njakob