New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

loug

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

loug

Console for debugging messages, errors and warnings in projects that are in development.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Loug

Console for debugging messages, errors and warnings in projects that are in development.

Installation

$ npm install --save loug

Add the production key in your package.json.

{
  "name": "testing",
  "version": "3.2.1",
  "description": "description testing",
  "main": "index.js",
  "scripts": {
  },
  "keywords": [
  ],
  "dependencies": {
  },
  "production": false    //=> This key
}

The key production is boolean type, true is production.

When the key is set to true the messages are not displayed. The opposite happens when it is false.

Usage

"production": false

var loug = require('loug');

loug("Hello")
//=> Hello
loug.warn("an advert")
//=> an advert
loug.ignore("Any argument or message")
//=> Any argument or message

"production": true

var loug = require('loug');

loug("Hello")
loug.warn("an advert")
loug.ignore("Any argument or message")
//=> Any argument or message

API

log(msg...)

Logs the message as if you called console.log

error(msg...)

Logs the message as if you called console.error

warn(msg...)

Logs the message as if you called console.warn

info(msg...)

Logs the message as if you called console.info

dir(msg...)

Logs the message as if you called console.dir

ignore(msg...)

Logs the message as if you called console.log. Logs the message in production and development.

Ignore all

Ignore the 'production' key and enable log, error, warn, dir and info. Only applies to the current document.

var loug = require('loug');

loug.set(true);

LICENCE

MIT

Keywords

FAQs

Package last updated on 19 Mar 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

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