Babel helper module for babel transforms authors to check the AST against duplicated nodes.
Package: babel-check-duplicated-nodes
Created by: Andarist
Last modified: Mon, 11 Apr 2022 16:34:03 GMT
Version: 1.0.0
License: MIT
Downloads: 2,540
Repository: https://github.com/Andarist/babel-check-duplicated-nodes
Install
npm install babel-check-duplicated-nodes
yarn add babel-check-duplicated-nodes
babel-check-duplicated-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's codebase.
API
checkDuplicatedNodes(babel, ast)