Registry / serialization / constructuring

constructuring

JSON →
library0.0.3jsnpmunverified

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.

serializationdevops
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.

Package is CommonJS-only; no ESM exports available.

const { transformSource } = require('constructuring');

Alternative correct import for AST-based usage.

const { transform } = require('constructuring');

Default export is the module itself, but named exports are preferred.

const constructuring = require('constructuring');

Shows both source transformation and AST-based transformation using constructuring.

const { transformSource } = require('constructuring'); const fs = require('fs'); const source = fs.readFileSync('module.js', 'utf8'); const result = transformSource(source); console.log(result); // Also AST-based: const esprima = require('esprima'); const escodegen = require('escodegen'); const ast = esprima.parse(source); const { transform } = require('constructuring'); transform(ast); console.log(escodegen.generate(ast));
constructuring --version
Debug
Known footguns
deprecatedPackage is abandoned; last version 0.0.3 released years ago. No support for modern JavaScript or ES6 beyond destructuring.
gotchaPackage is CommonJS-only; will not work with ESM imports without a bundler or wrapper.
gotchaTransform functions mutate the AST if provided; ensure you have a copy if needed.
breakingNo official TypeScript definitions; any type safety must be manually added.
deprecatedNo security patches or updates; known vulnerabilities in dependencies (esprima, escodegen) may be present.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources