Babel helper utility (v1.0.0) that checks an AST for duplicated nodes, throwing a descriptive error if any are found. Originally extracted from Babel's test fixture runner, this tool helps Babel transform authors catch subtle bugs caused by node reuse. It is a niche package with a single API call, no active release cadence, and is intended for internal use during transform development rather than general production.
npm install babel-check-duplicated-nodesVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use checkDuplicatedNodes with @babel/core to detect duplicated AST nodes.
Use 'const { checkDuplicatedNodes } = require('babel-check-duplicated-nodes')'.Ensure you only call this function on ASTs generated by Babel's parser, not third-party parsers.
Use `import { checkDuplicatedNodes } from 'babel-check-duplicated-nodes'` or `const { checkDuplicatedNodes } = require('babel-check-duplicated-nodes')`.Run `npm install babel-check-duplicated-nodes --save-dev`.
No dependency data recorded yet.