Registry / web-framework / es6-transpiler

es6-transpiler

JSON →
library0.7.18jsnpmunverified

An ES6 to ES5 transpiler that focuses on producing output without a runtime library, using only polyfills when necessary. It avoids try/catch for block binding, supports spread via .concat with iterator protocol, and strives for minimal temporary variables. The project is in beta and supports classes, destructuring, block binding (let/const), arrow functions, spread, for-of, comprehensions, template strings, object literals, binary/octal literals, unicode code point escapes, and RegExp flags. It does not support modules, generators, or symbols. Release cadence: dormant; latest version 0.7.18 from 2015. Key differentiator: no runtime library, line-to-line mapping, Closure Compiler support.

npm install es6-transpiler
INSTALL
IMPORT
SIG · ES6-TRANSPILER
E
es6-transpiler
web-frameworkjavascriptv0.7.18
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.

transpile
var transpile = require('es6-transpiler').transpile;
import { transpile } from 'es6-transpiler';
Package is not an ES module; only CommonJS require works.
default
var es6transpiler = require('es6-transpiler');
import es6transpiler from 'es6-transpiler';
No default export; require returns an object with transpile method.
run
var es6transpiler = require('es6-transpiler'); es6transpiler.run(src, options);
run() is available for programmatic use with source string.

Demonstrates programmatic usage: require, transpile a simple ES6 snippet, and log the output ES5 source.

var es6transpiler = require('es6-transpiler'); var result = es6transpiler.transpile('let x = 1; const y = 2;'); console.log(result.src); // Optionally configure with options object: var result2 = es6transpiler.transpile('() => 42', { environments: ['node'] }); console.log(result2.src);
es6-transpiler --version
Debug
Known issues
deprecatedProject is no longer maintained; not compatible with modern Node.js versions (ES6 features in V8 have diverged).
fix
Use Babel or Typescript for ES6 transpilation.
affects: >=0.7.18
breakingRequires an Object.create polyfill for older browsers (e.g., IE8).
fix
Include es5-shim or a polyfill before using the output.
affects: >=0.1.0
gotchaThe transpiler does not support modules, generators, or Symbol; if used on code with these, it may produce incorrect output or crash.
fix
Avoid using unsupported ES6 features or switch to a more modern transpiler.
affects: >=0.1.0
gotchaThe package does not ship TypeScript definitions; types must be declared manually.
fix
Define your own type declarations or use @ts-ignore.
affects: >=0.1.0
gotchaThe transpile function returns an object; it is not a streaming transform. For Gulp/Grunt, use wrapper plugins.
fix
Use grunt-es6-transpiler or gulp-es6-transpiler for build tool integration.
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'es6-transpiler'
Package not installed or not found in node_modules.
fix
Run 'npm install es6-transpiler' in your project directory.
TypeError: es6transpiler.transpile is not a function
Incorrect import: using import instead of require on a CommonJS module.
fix
Use 'var es6transpiler = require("es6-transpiler");' instead of ES module import.
SyntaxError: Unexpected token import (or other ES6 syntax) in transpiled output
Transpiler does not support 'import' statements (modules).
fix
Remove modules from source or use another transpiler like Babel.
Upgrade
Version history
0.7.18latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
es6-transpiler — npm install es6-transpiler · libregistry