Registry / esfive

esfive

JSON →
library0.1.1jsnpmunverified

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.

npm install esfive
INSTALL
IMPORT
SIG · ESFIVE
E
esfive
javascriptv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
var esfive = require('esfive');
import esfive from 'esfive';
No ES6 module support; CommonJS only.
compile
var result = esfive.compile('...');
esfive.compile() with wrong arguments
Main API function; accepts ES5 source string, returns object with 'code' property.
compileFile
var result = esfive.compileFile('file.js');
esfive.compileFile with non-string path
Reads file and transpiles; callback not supported.

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);
Debug
Known issues
deprecatedThis package is unmaintained since 2012 and not recommended for new projects.
fix
Use Babel or another modern transpiler.
affects: all
gotchaDoes not convert all ES5 features (e.g., getters/setters, ES6).
fix
Check the source for supported features.
affects: all
gotchaCompiled output may not fully preserve semantics of ES5 strict mode.
fix
Review output for correctness.
affects: all
Errors
Common errors & fixes
Cannot find module 'esfive'
Package not installed or missing.
fix
Run 'npm install esfive'.
Object.defineProperty is not a function
Output not run in an ES5 environment; requires polyfill.
fix
Use an ES5 shim or ensure ES5+ runtime.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
esfive — npm install esfive · libregistry