Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

console-dot

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-dot

Lazy debugging console syntax for callbacks & promises.

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

ConsoleDot

I can't believe I shipped to github and npm without a README. I'm usually a stickler for at least a placeholder //TODO version.

Summary

So, I made this mostly for me. Probably to solve a bad debug habit of rabbit holing via console.log. "Oh, ok let's just add a bunch of console.logs (sometimes on the server) and see whats happening." This module does not implement a better debugging method it simply enables you (read: me) to use this one more efficiently.

Plain and simple example, we want to see what a function is doing so we add this to the callback:

fs.readFile('path/to/file', function () {
    console.log('debug: we read the file?');
    console.log(arguments);
    console.log('++++++++++++++++++++++')
});

Becomes:

fs.readFile('path/to/file', console.callback(true, 'debug: we read the file?'));

Installation

npm install console-dot

Usage (Basic)

console = require('console-dot');
// access to console.callback have been gifted to you

Usage (More)

// TODO

Changelog

Because of this guy. I'm probably starting out wrong but I am atleast trying, Olivier.

v0.1.0

Essentially does the above basic implementation modifying console to to provide a callback() method that returns a curried function with your message. Keystroke savers, etc.

Keywords

FAQs

Package last updated on 23 Oct 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc