Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@designble/log-utils

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@designble/log-utils

Basic logging utils: colors, symbols and timestamp.

unpublished
latest
Source
npmnpm
Version
0.2.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

log-utils NPM version NPM downloads Build Status

Basic logging utils: colors, symbols and timestamp.

Install

Install with npm:

$ npm install --save log-utils

All module dependencies are tiny and are lazily evaluated, this takes around ~1 millisecond to load.

Usage

var log = require('log-utils');

API

.symbol.error

Error symbol.

Example

console.log(log.symbol.error);
//=> ✖

.symbol.info

Info symbol.

Example

console.log(log.symbol.info);
//=> ℹ

.symbol.success

Success symbol.

Example

console.log(log.symbol.success);
//=> ✔

.symbol.warning

Warning symbol.

Example

console.log(log.symbol.warning);
//=> ⚠

.error

Get a red error symbol.

Example

console.log(log.error);
//=> ✖

.info

Get a cyan info symbol.

Example

console.log(log.info);
//=> ℹ

.success

Get a green success symbol.

Example

console.log(log.success);
//=> ✔

.warning

Get a yellow warning symbol.

Example

console.log(log.warning);
//=> ⚠

.timestamp

Get a formatted timestamp.

Example

console.log(log.timestamp);
//=> [15:27:46]

.ok

Log a white success message prefixed by a green check.

Example

log.ok('Alright!');
//=> '✔ Alright!'

.heading

Make the given text bold and underlined.

Example

console.log(log.heading('foo'));
// or
console.log(log.heading('foo', 'bar'));

Colors

Available colors from ansi-colors:

  • .bgblack
  • .bgblue
  • .bgcyan
  • .bggreen
  • .bgmagenta
  • .bgred
  • .bgwhite
  • .bgyellow
  • .black
  • .blue
  • .bold
  • .cyan
  • .dim
  • .gray
  • .green
  • .grey
  • .hidden
  • .inverse
  • .italic
  • .magenta
  • .red
  • .reset
  • .strikethrough
  • .underline
  • .white
  • .yellow

Changes

v0.2.0 (2016-07-16)

  • removed: all spinner methods

v0.1.5 (2016-07-16)

  • added: .header method
  • fixed: .ok method, so that whitespace is respected

You might also be interested in these projects:

Contributing

This document was generated by verb-readme-generator (a verb generator), please don't edit directly. Any changes to the readme must be made in .verb.md. See Building Docs.

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Or visit the verb-readme-generator project to submit bug reports or pull requests for the readme layout template.

Building docs

(This document was generated by verb-readme-generator (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)

Generate readme and API documentation with verb:

$ npm install -g verb verb-readme-generator && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.

This file was generated by verb, v0.9.0, on July 11, 2016.

Keywords

ansi

FAQs

Package last updated on 15 Apr 2023

Did you know?

Socket

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