ESFive

raw JSON →
0.1.1 verified Fri May 01 auth: no javascript deprecated

ESFive is a minimal ES5-to-ES3 transpiler, version 0.1.1, last updated in 2012. It converts ECMAScript 5 constructs (like Object.create, Array.isArray, property descriptors, strict mode) into ES3-compatible code. Release cadence is unknown and appears dormant. Key differentiator: very early attempt at ES5-to-ES3 transpilation, now obsolete due to modern transpilers like Babel.

error Cannot find module 'esfive'
cause Package not installed or missing.
fix
Run 'npm install esfive'.
error Object.defineProperty is not a function
cause Output not run in an ES5 environment; requires polyfill.
fix
Use an ES5 shim or ensure ES5+ runtime.
deprecated This package is unmaintained since 2012 and not recommended for new projects.
fix Use Babel or another modern transpiler.
gotcha Does not convert all ES5 features (e.g., getters/setters, ES6).
fix Check the source for supported features.
gotcha Compiled output may not fully preserve semantics of ES5 strict mode.
fix Review output for correctness.
npm install esfive
yarn add esfive
pnpm add esfive

Transpile a simple ES5 property definition to ES3.

var esfive = require('esfive');
var input = 'Object.defineProperty(o, "p", {value: 1});';
var output = esfive.compile(input);
console.log(output.code);