0.0.2 • Published 1 year ago

thesurf v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Surf.js

Surf.js is a Node Library that focuses on making Console Color and Sized Text simplier to use for developers!

Installation

Node.js 16.9.0 or newer is required.

npm install @thesurf
npm install @thesurf@version

Related Packages

Example Usage

const surf = require("thesurf");

console.log(surf.blue("Hello world!"));

Surf is a simple API that allows the developer to easily access many different

const surf = require("thesurf");

const log = console.log;

// Combine styled and normal strings
log(surf.blue('Hello') + ' World' + surf.red('!'));

You can also create your own themes:

const surf = require("thesurf");

const error = surf.red;
const warning = surf.green;

console.log(error('Error!'));
console.log(warning('Warning!'));

Take advantage of the console.log string functions:

const surf = require("thesurf");

const name = 'Sindre';
console.log(surf.green('Hello %s'), name);
//=> 'Hello Sindre'

Styles

Modifiers

  • bold - Makes the text bold.
  • dim - Dim's the lights opacity.
  • italic - Make the text italic. (Not widely supported)
  • underline - Put a horizontal line below the text.
  • hidden - Print the text but make it invisible.
  • strikethrough - Puts a horizontal line through the center of the text. (Not widely supported)

Colors

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • gray

Background colors

  • bgBlack
  • bgRed
  • bgGreen
  • bgYellow
  • bgBlue
  • bgMagenta
  • bgCyan
  • bgWhite
  • bgGray

Maintainers

  • Cawlr - Core Maintainer of Surf.js