(replacements, nodePath, replaceFn, comparator)
| 56 | */ |
| 57 | // eslint-disable-next-line max-params |
| 58 | const processNode = (replacements, nodePath, replaceFn, comparator) => { |
| 59 | const replacementKey = find(getSortedObjectPaths(replacements), |
| 60 | (value) => comparator(nodePath, value)); |
| 61 | if (has(replacements, replacementKey)) { |
| 62 | replaceAndEvaluateNode(replaceFn, nodePath, get(replacements, replacementKey)); |
| 63 | } |
| 64 | }; |
| 65 | |
| 66 | /** |
| 67 | * Checks if the given identifier is an ES module import |
no test coverage detected
searching dependent graphs…