# babel-plugin-transform-builtin-extend

> A plugin for Babel 6 supports extending from builtin types based on static analysis.

Latest version **1.1.2** (published 2017-02-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-transform-builtin-extend
pnpm add babel-plugin-transform-builtin-extend
yarn add babel-plugin-transform-builtin-extend
bun add babel-plugin-transform-builtin-extend
```

## 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.1.2 |
| Published | 2017-02-10 |
| First published | 2015-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 148 |
| Author | Logan Smyth |
| Maintainers | loganfsmyth |
| Keywords | babel, babel-plugin, es6, classes |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-transform-builtin-extend
- Repository: https://github.com/loganfsmyth/babel-plugin-transform-builtin-extend
- Homepage: https://github.com/loganfsmyth/babel-plugin-transform-builtin-extend#readme
- Issues: https://github.com/loganfsmyth/babel-plugin-transform-builtin-extend/issues
- npm.io page: https://npm.io/package/babel-plugin-transform-builtin-extend

## Dependencies (2)

- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.2.0
- [babel-template](https://npm.io/package/babel-template.md) ^6.3.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

- 1.1.2 (latest) — 2017-02-10
- 1.1.1 — 2017-02-10
- 1.1.0 — 2015-12-11
- 1.0.0 — 2015-12-11

## README

# Babel Builtin Constructor extension plugin

This is a Babel 6 plugin to enable extending builtin types like "Error" and "Array" and such,
which require special treatment and require static analysis to detect.


## Usage

In your Babel 6 configuration, for example in a `.babelrc` you might have


```
{
    "plugins": [
        ["babel-plugin-transform-builtin-extend", {
            globals: ["Error", "Array"]
        }]
    ]
}
```

which would enable the plugin and configure it to look for any class extending `Error` or `Array` globals.

## IE<=10

On older browsers that do not support reassigning the prototype of an existing object, you will need to
enable the `approximate` mode, which will fall back to the Babel 5 behavior of using simple ES5 inheritance
to approximate extending a class, though your results may vary depending on your goals.


```
{
    "plugins": [
        ["babel-plugin-transform-builtin-extend", {
            globals: ["Error", "Array"],
            approximate: true
        }]
    ]
}
```

## Limitations

This plugin will only reles on assigning `__proto__` for static property inheritance from parent constructors.
If you are relying on this, it will not work on IE<=10 and any other browsers that don't support `__proto__`.

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