# babel-plugin-check-jsapi-in-es5

> Check whether the use of non es5 js api.

Latest version **1.0.4** (published 2016-07-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-check-jsapi-in-es5
pnpm add babel-plugin-check-jsapi-in-es5
yarn add babel-plugin-check-jsapi-in-es5
bun add babel-plugin-check-jsapi-in-es5
```

## 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.4 |
| Published | 2016-07-14 |
| First published | 2016-07-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | @Naixor |
| Maintainers | naixor |
| Keywords | babel, plugin, es5, api, check |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-check-jsapi-in-es5
- Repository: https://github.com/Naixor/babel-plugin-check-jsapi-in-es5
- Homepage: https://github.com/Naixor/babel-plugin-check-jsapi-in-es5#readme
- Issues: https://github.com/Naixor/babel-plugin-check-jsapi-in-es5/issues
- npm.io page: https://npm.io/package/babel-plugin-check-jsapi-in-es5

## Dependencies (2)

- [colors](https://npm.io/package/colors.md) ^1.1.2
- [cli-interact](https://npm.io/package/cli-interact.md) ^0.1.9

## 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.4 (latest) — 2016-07-14
- 1.0.3 — 2016-07-14
- 1.0.1 — 2016-07-06
- 1.0.0 — 2016-07-06

## README

# babel-plugin-check-jsapi-in-es5

## Installation

> `npm install babel-plugin-check-jsapi-in-es5 --save-dev`

## Why?

Check whether the use of non es5 js api and give you a warning or error. One case, js in mobile system can not support es5+ well, so I use this before commit.

## Usage

```JavaScript
babel.transformFileSync(path.join(src_fe_dir, check_file), {
    babelrc: false,
    compact: false,
    plugins: [
        ['check-is-es5',
        {
            log: 2
        }]
    ]
});
```

## Options

> `log`
+ 0: eigher error or warning can exit your code and throw error.
+ 1: only error can exit your code and throw error. (default)
+ 2: just warning.

## CheckList

> bind

```JavaScript
var a = Array.prototype.findIndex.bind(c);
a(123); // error
```

> call/apply

```JavaScript
var a = Array.prototype.findIndex;
a.call(c, 123); // error
```

> super scope reference

```JavaScript
var a = [],
    b = Array.prototype,
    c,
    d = 'hah',
    e = Uint8Array();

c = a;
c = d;
c = e;

b.findIndex(); // error
c.findIndex(); // error
function cc() {
    return c.findIndex(123); // error
}
```

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