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

@integromat/debug

Package Overview
Dependencies
Maintainers
49
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@integromat/debug

A simple wrapper around `debug` module that adds Overseer integration.

  • 1.0.12
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
49
Weekly downloads
 
Created
Source

Debug

A simple wrapper around debug module that adds Overseer integration.

Example usage

const debug = require('@integromat/debug');

const appLogger = debug('imt:app');
const appRequestLogger = debug('imt:app:request'); // either create entirely new function
const appResponseLogger = appLogger.extend('response'); // or extend existing one

appLogger('abc');         // ... imt:app abc
appRequestLogger('def');  // ... imt:app:request def
appResponseLogger('ghj'); // ... imt:app:response ghj

const obj = {};
appLogger('Object: %O', obj); // supports logging of objects
appLogger(`Object: ${JSON.stringify(obj, null, 2)}`); // but preferred way for deeply nested objects is template literal and JSON.stringify

appLogger(() => `Object: ${JSON.stringify(obj, null, 2)}`); // for computationally intense operations use lambda functions
appLogger(() => ['Object: %O', obj]); // if there are multiple arguments, it's okay to return array

FAQs

Package last updated on 11 Jul 2022

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