# babel-plugin-helper-debug

> a babel plugin for debug

Latest version **0.1.5** (published 2023-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-helper-debug
pnpm add babel-plugin-helper-debug
yarn add babel-plugin-helper-debug
bun add babel-plugin-helper-debug
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-06-16 |
| First published | 2022-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zhongfake |
| Maintainers | zhongfake |
| Keywords | babel-plugin, debug |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-helper-debug
- Repository: https://gitee.com/kezhongfa/babel-plugin-helper-debug
- Homepage: https://gitee.com/kezhongfa/babel-plugin-helper-debug#readme
- Issues: https://gitee.com/kezhongfa/babel-plugin-helper-debug/issues
- npm.io page: https://npm.io/package/babel-plugin-helper-debug

## Dependencies (2)

- [@babel/core](https://npm.io/package/@babel/core.md) ^7.17.8
- [schema-utils](https://npm.io/package/schema-utils.md) ^4.0.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2023-06-16
- 0.1.4 — 2023-06-16
- 0.1.1 — 2022-03-22
- 0.1.0 — 2022-03-22
- 0.0.1 — 2022-03-22

## README

# babel-plugin-helper-debug

a babel plugin for debug

## why

Sometimes we need to write some logic code in some environment.This plugin is to solve this problem.

## Install

```shell
npm i babel-plugin-helper-debug
```

## Usage

babel.config.js

options

- varName: variable name,default('\_\_DEBUG\_\_')
- remove: removable,default(false)

```js
// babel.config.js

module.exports = {
  plugins: [
    [
      "helper-debug",
      { varName: "__DEBUG__", remove: process.env.NODE_ENV === "production" },
    ],
  ],
};
```

in you code

```js
if (__DEBUG__) {
  // for debug
  console.log("debug test");
}
```

when you use eslint

```js
// .eslintrc.js
module.exports = {
  globals: {
    __DEBUG__: true,
  },
};
```

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