Skip to content

Console logging, inspecting and debugging tool.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt
Notifications You must be signed in to change notification settings

fluidecho/preview2

Repository files navigation

Preview2

build status NPM version node version

Console logging, inspecting and debugging tool.

Instead of having console.log and util.inspect all over your code during development, use preview and can then turn object printing on or off using --preview argument.

Simpler than Preview.

Installation

From your terminal, requires node.js.

npm install preview2

Example

In TypeScript.

/// <reference types="@types/node" />
//
// ts-node example.ts --preview
//

import { preview, Log } from 'preview2';

const log: Log = preview(__filename);

log('will always print', undefined, true);

let foo: any = {bar: 8211, hello: 'world', list: [1,2,3]};   // some object to inspect.
 
log('foo');
log('foo object', foo);
log(foo);

Run:

ts-node example.ts --preview

License

Choose either: MIT or Apache 2.0.

About

Console logging, inspecting and debugging tool.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published