better-console

WebJar for better-console

Лицензия

Лицензия

BSD
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

better-console
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

better-console
WebJar for better-console
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/mohsen1/better-console

Скачать better-console

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/better-console/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>better-console</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/better-console/
implementation 'org.webjars.npm:better-console:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/better-console/
implementation ("org.webjars.npm:better-console:1.0.1")
'org.webjars.npm:better-console:jar:1.0.1'
<dependency org="org.webjars.npm" name="better-console" rev="1.0.1">
  <artifact name="better-console" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='better-console', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "better-console" % "1.0.1"
[org.webjars.npm/better-console "1.0.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : chalk jar [1.1.3,2)
org.webjars.npm : cli-table jar [0.3.1,0.4)

Модули Проекта

Данный проект не имеет модулей.

Better Console

Screenshot

Installation

Use NPM

$ npm install better-console

A better console for Node.js

better-console is a drop-in replacement for node's default console which gives you colors and more methods in console.

How to use it

You can override console object itself or assign better console to another variable. It's completely safe to override the native console object because better console calls native console methods for methods that are already available in it.

var console = require('better-console');

console.log("This is a log information");
console.warn("Warning!");
console.info("Information");
console.table([ [1,2], [3,4] ]);
console.time("Timer");
console.timeEnd("Timer");
console.dir(myObject);

Methods

console.log, console.warn, console.error, console.info, console.debug, console.dir, console.trace

These methods work exactly same as native console methods but with colors for warn, info or error

console.clear

Clears the screen

console.table

Draws a table of data if a 2d array or object passed to it

console.time

Creates a new timer under the given name. Call console.timeEnd(name) with the same name to stop the timer and print the time elapsed.

console.timeEnd

Stops a timer created by a call to console.time(name) and write the time

console.trace

Prints a stack trace of JavaScript execution at the point where it is called. The stack trace details the functions on the stack, as well as the values that were passed as arguments to each function.

console.count

Writes number of times each argument is called with blue color

TODOs

  • Use Unicode icons to mimic browser console icons in OSX
  • Make console.trace more detailed with V8 flags

Версии библиотеки

Версия
1.0.1