# es3-safe-recast

> esprima/recast es3 safe compile step

Latest version **3.0.0** (published 2018-02-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install es3-safe-recast
pnpm add es3-safe-recast
yarn add es3-safe-recast
bun add es3-safe-recast
```

## 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 | 3.0.0 |
| Published | 2018-02-09 |
| First published | 2014-05-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4 |
| Dependencies | 2 |
| Unpacked size | 33.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Stefan Penner |
| Maintainers | fivetanley, rwjblue, stefanpenner |

## Links

- npm: https://www.npmjs.com/package/es3-safe-recast
- Repository: https://github.com/stefanpenner/es3-safe-recast
- Homepage: https://github.com/stefanpenner/es3-safe-recast#readme
- Issues: https://github.com/stefanpenner/es3-safe-recast/issues
- npm.io page: https://npm.io/package/es3-safe-recast

## Dependencies (2)

- [recast](https://npm.io/package/recast.md) ^0.13.0
- [esprima](https://npm.io/package/esprima.md) ^4.0.0

## Recent versions

- 3.0.0 (latest) — 2018-02-09
- 2.0.2 — 2015-11-27
- 2.0.1 — 2015-03-15
- 2.0.0 — 2015-03-15
- 1.0.0 — 2014-08-27
- 0.0.8 — 2014-07-10
- 0.0.7 — 2014-06-11
- 0.0.6 — 2014-06-09
- 0.0.5 — 2014-06-08
- 0.0.4 — 2014-05-27
- 0.0.3 — 2014-05-26
- 0.0.2 — 2014-05-26
- 0.0.1 — 2014-05-26
- 0.0.0 — 2014-05-26

## README

# es3-safe-recast [![Build Status](https://travis-ci.org/stefanpenner/es3-safe-recast.svg)](https://travis-ci.org/stefanpenner/es3-safe-recast)

Recasts all [ECMAScript 3][1] reserved words to their safe alternatives.

Optionally removes trailing commas in object and array literals (pass `{ trailingComma: true }` as the second argument to compile).


## helpers

* [grunt-es3-safe-recast](https://github.com/phpro/grunt-es3-safe-recast)
* [gulp-dereserve](https://www.npmjs.com/package/gulp-dereserve)
* [broccoli-es3-safe-recast](broccoli-es3-safe-recast)

## Before

```js
ajax('/asdf/1').catch(function(reason) {

}).finally(function() {

});
```

## After

```js
ajax('/asdf/1')['catch'](function(reason) {

})['finally'](function() {

});
```

## Before

```js
object = {
  catch:   function() {},
  finally: function() {},
  default: function() {}
};
```

## After

```js
object = {
  'catch':   function() {},
  'finally': function() {},
  'default': function() {}
};
```

[1]: http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf

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