{"id":25804,"library":"jsdc","title":"jsdc","description":"jsdc is a JavaScript transpiler that converts ES6/ES2015 code to ES5 for backward compatibility. Current stable version is 0.6.13, last released in 2017. It focuses on safe transformations preserving line numbers for debugging, supports CommonJS/AMD/CMD, and includes features like let/const, arrow functions, classes, generators, destructuring, template literals, and modules. Unlike Babel or Traceur, jsdc is lightweight, has no runtime dependencies, and aims for simplicity. The project appears to be in maintenance mode with no recent updates.","status":"maintenance","version":"0.6.13","language":"javascript","source_language":"en","source_url":"git://github.com/army8735/jsdc","tags":["javascript","jsdc","ecmascript6","ecmascript5","es6toes5","transform","compiler"],"install":[{"cmd":"npm install jsdc","lang":"bash","label":"npm"},{"cmd":"yarn add jsdc","lang":"bash","label":"yarn"},{"cmd":"pnpm add jsdc","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM import is preferred; CJS require works but requires default import handling.","wrong":"const Jsdc = require('jsdc')","symbol":"Jsdc","correct":"import Jsdc from 'jsdc'"},{"note":"Static method 'parse' is available directly on the imported class.","wrong":"const parse = require('jsdc').parse","symbol":"parse (static method)","correct":"import Jsdc from 'jsdc'; const result = Jsdc.parse(code)"},{"note":"Only available in Node.js; enables precompilation via require hook.","wrong":"const runtime = require('jsdc').runtime","symbol":"runtime","correct":"import Jsdc from 'jsdc'; Jsdc.runtime(true)"}],"quickstart":{"code":"import Jsdc from 'jsdc';\n\nconst es6Code = `\nconst greet = (name) => {\n  console.log(`Hello, ${name}!`);\n};\n`;\n\nconst es5Code = Jsdc.parse(es6Code);\nconsole.log(es5Code);\n// Output: var greet = function(name) {\n//   console.log('Hello, ' + name + '!');\n// };","lang":"javascript","description":"Shows basic usage: transpile ES6 code (arrow function, template literal) to ES5 using jsdc."},"warnings":[{"fix":"Add a polyfill such as `import 'es6-shim'` before using Set/Map/Promise.","message":"jsdc does NOT provide polyfills for ES6 built-ins like Set, Map, or Promise. You must include your own polyfill library (e.g., es6-shim) if your code depends on them.","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Avoid using runtime in production; instead, transpile files ahead of time.","message":"The `runtime(flag)` method modifies Node.js's require mechanism globally, which can cause unexpected behavior in larger projects or when combined with other transpilers.","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Migrate to Babel: `npm install @babel/core @babel/preset-env`","message":"This package is no longer actively maintained. The last release was in 2017. For new projects, consider using Babel or SWC.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Ensure your target environment supports Object.defineProperty or use a polyfill.","message":"jsdc uses `Object.defineProperty` for some transformations, which may not be fully supported in older JavaScript engines (IE < 9).","severity":"gotcha","affected_versions":">=0.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install homunculus` alongside jsdc to install the dependency.","cause":"jsdc depends on the `homunculus` parser, which may not be installed automatically in all environments.","error":"Cannot find module 'homunculus'"},{"fix":"Use `const Jsdc = require('jsdc').default` or switch to ES6 import syntax.","cause":"Using `require('jsdc')` returns an object with a default export, not the constructor directly.","error":"TypeError: Jsdc is not a constructor"},{"fix":"Run `npm install jsdc --save-dev` to install it as a dev dependency.","cause":"jsdc is not installed or is not in the project's node_modules.","error":"Error: Cannot find module 'jsdc'"},{"fix":"Add `import 'regenerator-runtime/runtime'` before using any generator code.","cause":"jsdc transpiles generators to regenerator runtime, which must be included separately.","error":"ReferenceError: regeneratorRuntime is not defined"},{"fix":"Ensure jsdc.parse() is executed before running the code in an ES5-only environment.","cause":"jsdc is not being called on the code; the code is running directly in an environment that doesn't support ES6.","error":"Unexpected token '=>' (or similar ES6 syntax)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}