Debian Codegraph @

packages/babel-helper-check-duplicate-nodes/README.md

raw symbols SCIP
1 # @babel/helper-check-duplicate-nodes
2
3 Duplicated AST nodes often lead to obscure bugs. This module checks your AST and
4 throws a helpful error if you include a duplicated node in your output. It's
5 useful when authoring babel transforms.
6
7 This piece of code was originally written by @nicolo-ribaudo and is included in
8 [@babel/helper-transform-fixture-test-runnner](https://github.com/babel/babel/blob/d383659ca6adec54b6054f77cdaa16da88e8a171/packages/babel-helper-transform-fixture-test-runner/src/index.js#L128).
9
10 ## API
11
12 ```js
13 import checkDuplicateNodes from "@babel/helper-check-duplicate-nodes";
14 checkDuplicateNodes(ast);
15 ```