# debark

> …because it _strips logs_ 🤣

Latest version **1.0.1** (published 2021-09-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install debark
pnpm add debark
yarn add debark
bun add debark
```

## 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.0.1 |
| Published | 2021-09-07 |
| First published | 2021-09-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | hryggrbyr |

## Links

- npm: https://www.npmjs.com/package/debark
- npm.io page: https://npm.io/package/debark

## Recent versions

- 1.0.1 (latest) — 2021-09-07
- 1.0.0 — 2021-09-07

## README

# Debark

…because it _strips logs_ 🤣

## Methods

There are two methods provided:

### AllowDebug

Determines whether debugging is allowed

For example;

```javascript
import { AllowDebug } from 'debark';

if (AllowDebug()) console.log('I am allowed to log');
```

### StripLogs

Prevents console logging unless specifically requested

For example;

```javascript
import { StripLogs } from 'debark';

StripLogs();
```

## How it works

The `StripLogs` method uses the `AllowDebug` method under the hood.

`AllowDebug` expects a `DEBUG` value in the `process.env`s. If one is not found, or exists and is any value other than `true` (BOOLEAN) or `true` (String), `AllowDebug` returns false and all logs are `noop`ed.

## How to run your application with debugging switched "on"

```bash
DEBUG=true npm start
```

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