# fix-babel-class

> A runtime one-off fix for Babel transpiled classes.

Latest version **0.1.0** (published 2017-06-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install fix-babel-class
pnpm add fix-babel-class
yarn add fix-babel-class
bun add fix-babel-class
```

## 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.0 |
| Published | 2017-06-06 |
| First published | 2017-04-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Andrea Giammarchi |
| Maintainers | webreflection |
| Keywords | babel, class, bug, native, extend, fix |

## Links

- npm: https://www.npmjs.com/package/fix-babel-class
- Repository: https://github.com/WebReflection/fix-babel-class
- Homepage: https://github.com/WebReflection/fix-babel-class#readme
- Issues: https://github.com/WebReflection/fix-babel-class/issues
- npm.io page: https://npm.io/package/fix-babel-class

## Recent versions

- 0.1.0 (latest) — 2017-06-06
- 0.0.0 — 2017-04-26

## README

# fix-babel-class
A runtime one-off fix for Babel [broken](https://github.com/babel/babel/issues/4480) transpiled classes.

```js
class List extends Array {}

class CustomElement extends HTMLElement {}
customElements.define('custom-element', CustomElement);

// fix whenever you need classes you want
fixBabelClass(List);
fixBabelClass(CustomElement);

console.log(
  // this is **false** without the fix
  new List instanceof List,
  // this **breaks** without the fix
  new CustomElement instanceof CustomElement,
  // this **won't ever work** without the fix
  (new CustomElement).nodeName
);
```

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