@linaria/utils
Version:
Blazing fast zero-runtime CSS in JS library
6 lines • 312 B
JavaScript
export function getScope(path) {
// In some nodes (like FunctionDeclaration) `scope` for `id` returns
// local function scope instead of a scope where function is declared.
return path.key === 'id' && path.parent === path.scope.block ? path.scope.parent : path.scope;
}
//# sourceMappingURL=getScope.js.map