mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* Working helper * Added pkg.json description * 1.0.0 * cleanup build scripts * refactor: convert to TS * add checkDuplicateNodes to parser tests * remove babel core injection * ignore check-duplicate-nodes and readme generator * add test cases * refactor: simplify duplicate nodes tracking Co-authored-by: Mateusz Burzyński <[email protected]>
630 B
630 B
@babel/helper-check-duplicate-nodes
Duplicated AST nodes often lead to obscure bugs. This module checks your AST and throws a helpful error if you include a duplicated node in your output. It's useful when authoring babel transforms.
This piece of code was originally written by @nicolo-ribaudo and is included in @babel/helper-transform-fixture-test-runnner.
API
import checkDuplicateNodes from "@babel/helper-check-duplicate-nodes";
checkDuplicateNodes(ast);