UNPKG

eslint-plugin-unicorn

Version:
10 lines (7 loc) 221 B
'use strict'; const {uniq, flatten} = require('lodash'); const getReferences = scope => uniq([ ...scope.references, ...flatten(scope.childScopes.map(scope => getReferences(scope))) ]); module.exports = getReferences;