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

dever

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dever

A dev helper.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

dever

A dev helper.

Installation

npm install dever

Quick Start

var debug = require('dever').debug('Controller/Users')
var error = require('dever').error('Controller', 'Users')
debug('hey, I got something here')
return error('opps, something goes wrong')

Silent Mode

Turn off the output:

var debug = require('dever').debug('/api/users').off
var error = require('dever').error('/api/users').off

Log levels

  • 0 [EMERGENCY] system is unusable
  • 1 [ALERT] action must be taken immediately
  • 2 [CRITICAL] the system is in critical condition
  • 3 [ERROR] error condition
  • 4 [WARNING] warning condition
  • 5 [NOTICE] a normal but significant condition
  • 6 [INFO] a purely informational message
  • 7 [DEBUG] messages to debug an application

dev.json

A config file to control output in development:

{
  "output": {
    "EMERGENCY": true,
    "ALERT": true,
    "CRITICAL": true,
    "ERROR": true,
    "WARNING": true,
    "NOTICE": true,
    "INFO": true,
    "DEBUG": true 
  },
  "throw": true
}

pro.json

A config file to control output in production:

{
  "output": {
    "EMERGENCY": false,
    "ALERT": false,
    "CRITICAL": false,
    "ERROR": false,
    "WARNING": false,
    "NOTICE": false,
    "INFO": false,
    "DEBUG": false 
  },
  "throw": false
}

Todo

  • readFileJSON() to require()

Copyright (c) 2013 Shallker Wang - MIT License (enclosed)

Keywords

FAQs

Package last updated on 28 Aug 2013

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