Constructuring is an ES6-to-ES3 transpiler specifically for the destructuring feature. It transforms JavaScript code using ES6 destructuring (arrays and objects) into ES3-compatible code that runs in older browsers. Current version 0.0.3, with no recent updates indicating it is no longer maintained. It operates on source strings or esprima ASTs, making it suitable for integration into build pipelines that already use esprima and escodegen. Compared to broader transpilers like Babel, Constructuring focuses only on destructuring, which may be useful for targeted transformations but lacks active development and broader language feature support.
npm install constructuringNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows both source transformation and AST-based transformation using constructuring.
Use a modern transpiler like Babel or SWC for full ES6+ support.
Use require() or wrap in a bundler that supports CJS.
Clone the AST before passing if you need the original for other purposes.
Create your own .d.ts or use @ts-ignore.
Do not use in production; fork and update dependencies if necessary.
Use const { transformSource } = require('constructuring');First transpile with a broader tool like Babel, or ensure input only uses destructuring.
Run npm install constructuring --save or check spelling: 'constructuring' (note: not 'constructuring').
npm install esprima escodegen