0.2.6 • Published 6 years ago

preview2 v0.2.6

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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.

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago