# babel-plugin-hnt

> Compiles away hnt function calls so you get the benefits without the added bundle size.

Latest version **1.0.0** (published 2017-11-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-hnt
pnpm add babel-plugin-hnt
yarn add babel-plugin-hnt
bun add babel-plugin-hnt
```

## 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.0 |
| Published | 2017-11-04 |
| First published | 2017-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Divyagnan |
| Maintainers | divyagnan |
| Keywords | hnt, babel, plugin, babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-hnt
- Repository: https://github.com/divyagnan/babel-plugin-hnt
- Homepage: https://github.com/divyagnan/babel-plugin-hnt#readme
- Issues: https://github.com/divyagnan/babel-plugin-hnt/issues
- npm.io page: https://npm.io/package/babel-plugin-hnt

## 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

- 1.0.0 (latest) — 2017-11-04

## README

# babel-plugin-hnt

Compiles away [`hnt`](https://github.com/divyagnan/hnt) function calls so you can get ergonomic and safety benefits of hnt without the increased bundle size. 

## Example

**In**

```js
// input code
hnt(myArray, "[0].potentialValue", 42)
```

**Out**

```js
"use strict";

// output code
myArray && myArray[0] && myArray[0].potentialValue || 42;
```

## Installation

```sh
$ npm install babel-plugin-hnt
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["hnt"]
}
```

### Via CLI

```sh
$ babel --plugins hnt script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["hnt"]
});
```

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