New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

console-pop

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-pop

Make stackable console object to grab anything written to console.log

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

console-pop

Easy way to capture console.log output, for example for unit testing

NPM

Build status

Example

var con = require('console-pop');
con.push();
// call other code that uses console.log
// a copy of the output is stored in con object
var str = con.pop()
// original console.log is restored
assert(/success/i.test(str), 'program reports success')

Small print

Author: Gleb Bahmutov © 2014

License: MIT - do anything with the code, but don't blame me if it does not work.

Spread the word: tweet, star on github, etc.

Support: if you find any problems with this module, email / tweet / open issue on Github

Keywords

console

FAQs

Package last updated on 17 Jul 2017

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