# @norjs/debug

> Debug helpers for JavaScript

Latest version **1.3.3** (published 2019-01-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @norjs/debug
pnpm add @norjs/debug
yarn add @norjs/debug
bun add @norjs/debug
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.3 |
| Published | 2019-01-01 |
| First published | 2018-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 46.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jaakko-Heikki Heusala |
| Maintainers | jhh |
| Keywords | debug, assert |

## Links

- npm: https://www.npmjs.com/package/@norjs/debug
- Repository: https://github.com/norjs/debug
- Homepage: https://github.com/norjs/debug#readme
- Issues: https://github.com/norjs/debug/issues
- npm.io page: https://npm.io/package/@norjs/debug

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [@norjs/is](https://npm.io/package/@norjs/is.md) ^1.3.3

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.3.3 (latest) — 2019-01-01
- 1.3.2 — 2018-12-29
- 1.0.2 — 2018-12-28

## README

@norjs/debug
============

Debug helpers for JavaScript.

Installation
------------

You can install the module from the NPM: `npm install -d @norjs/debug`

Get current line number
-----------------------

You can use `debug.__line` to get current line number for debugging purposes.

Get current stack
-----------------

`debug.__stack` is used by `debug.__line` to get the current line number.

Development or production mode tests
------------------------------------

You can test for development and/or production mode (NODE_ENV) with the 
`debug.isProduction()` and `debug.isDevelopment()` which will return boolean 
values, `true` or `false`.

Start the app using `NODE_ENV=production node app.js` for production mode.

Start the app using `NODE_ENV=development node app.js` for development mode.

Default is development mode.

Write debug log messages
------------------------

You may use `debug.log(msg, [msg2...])` to write debug messages. This function 
will only write log if the app is running in the development mode. All 
non-string arguments will be converted to string.

Commercial Support
------------------

You can buy commercial support from [Sendanor](https://sendanor.com/).

---
_Source: https://npm.io/package/@norjs/debug · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
