🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

simple-output

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-output

Output messages to stdout/stderr

0.2.2
Source
npm
Version published
Weekly downloads
7.4K
1.24%
Maintainers
1
Weekly downloads
 
Created
Source

simple-output

version: 0.2.2

Build Status

Output messages to stdout/stderr

Getting Started

Install the module with: npm install simple-output

Examples

var log = require('simple-output');

log.success('Successful hello world');

Available methods

  • success(msg)
  • error(msg)
  • info(msg)
  • message(msg)
  • warning(msg)

Testing

This module helps on testing your output data by exposing the streams to which the data gets written to.

In order to test your output information, replace the stdout/stderr properties with an mock object containing a write function. See the example below:

var log = require('simple-output');

log.stdout = {
    write: function(msg) {
        assert(msg, 'hello world');
    }
};

log.message('hello world');

License

Copyright (c) 2014 Ruy Adorno. Licensed under the MIT license.

Keywords

terminal

FAQs

Package last updated on 04 Aug 2014

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