# babel-plugin-annotate-pure-call-in-variable-declarator

> Automated annotate **#__PURE__** to call expression which in variable declarator and assignment expression

Latest version **0.2.1** (published 2017-09-11) · WTFPL license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install babel-plugin-annotate-pure-call-in-variable-declarator
pnpm add babel-plugin-annotate-pure-call-in-variable-declarator
yarn add babel-plugin-annotate-pure-call-in-variable-declarator
bun add babel-plugin-annotate-pure-call-in-variable-declarator
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2017-09-11 |
| First published | 2017-08-03 |
| Weekly downloads | 0 |
| License | WTFPL |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Morlay Null |
| Maintainers | morlay_null |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-annotate-pure-call-in-variable-declarator
- Repository: https://github.com/morlay/babel-plugin-annotate-pure-call-in-variable-declarator
- Homepage: https://github.com/morlay/babel-plugin-annotate-pure-call-in-variable-declarator#readme
- Issues: https://github.com/morlay/babel-plugin-annotate-pure-call-in-variable-declarator/issues
- npm.io page: https://npm.io/package/babel-plugin-annotate-pure-call-in-variable-declarator

## Dependencies (3)

- [babel-traverse](https://npm.io/package/babel-traverse.md) 6.26.0
- [@types/babel-traverse](https://npm.io/package/@types/babel-traverse.md) 6.25.2
- [babel-plugin-syntax-dynamic-import](https://npm.io/package/babel-plugin-syntax-dynamic-import.md) 6.18.0

## Recent versions

- 0.2.1 (latest) — 2017-09-11
- 0.2.0 — 2017-08-29
- 0.1.0 — 2017-08-05
- 0.0.2 — 2017-08-03
- 0.0.1 — 2017-08-03
- 0.0.0 — 2017-08-03

## README

## babel-plugin-annotate-pure-call-in-variable-declarator

[![Build Status](https://img.shields.io/travis/morlay/babel-plugin-annotate-pure-call-in-variable-declarator.svg?style=flat-square)](https://travis-ci.org/morlay/babel-plugin-annotate-pure-call-in-variable-declarator)
[![NPM](https://img.shields.io/npm/v/babel-plugin-annotate-pure-call-in-variable-declarator.svg?style=flat-square)](https://npmjs.org/package/babel-plugin-annotate-pure-call-in-variable-declarator)
[![Dependencies](https://img.shields.io/david/morlay/babel-plugin-annotate-pure-call-in-variable-declarator.svg?style=flat-square)](https://david-dm.org/morlay/babel-plugin-annotate-pure-call-in-variable-declarator)
[![License](https://img.shields.io/npm/l/babel-plugin-annotate-pure-call-in-variable-declarator.svg?style=flat-square)](https://npmjs.org/package/babel-plugin-annotate-pure-call-in-variable-declarator)

Automated annotate **#__PURE__** to call expression which in **variable declarator**, 
**assignment expression** and **arguments of call expression**

### Purpose

help to annotate **#__PURE__** to drop dead code in [Webpack](https://github.com/webpack/webpack) 
for uglyfiy and tree shaking


Will transform

```js
export const call = (s) => {
  return "call" + s
}

export const stringA = call("a")
export const stringB = (() => call("b"))()
```

to

```js
export const call = (s) => {
  return "call" + s
}

export const stringA = /*#__PURE__*/call("a")
export const stringB = /*#__PURE__*/(() => call("b"))()
```

---
_Source: https://npm.io/package/babel-plugin-annotate-pure-call-in-variable-declarator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
