custom.stdout
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Allows the developer to shows logs in a fixed area of output. It could be useful:

  • to show state
  • to show errors
  • to show important messages

Example

Usage

npm install custom.stdout --save
import { StdoutController } from 'custom.stdout';
 
// Create instance. As argument we should provide target stream.
// As usual it's process.stdout
const stdout = new StdoutController(process.stdout);
 
// To post logs into "normal" (common area):
stdout.out('LOGS INTO COMMON AREA');
 
// To post logs into "fixed" area just define ID of it
stdout.out('Important message', 'messages');
 
stdout.out('Operations done: 43\nRAM used: 324Mb', 'operations');
 

Dependents (1)

Package Sidebar

Install

npm i custom.stdout

Weekly Downloads

76

Version

1.0.2

License

Apache 2

Unpacked Size

30.9 kB

Total Files

9

Last publish

Collaborators

  • dvastafyev