# babel-flow-scope

> Collect Flow bindings in a given scope

Latest version **1.2.1** (published 2017-10-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-flow-scope
pnpm add babel-flow-scope
yarn add babel-flow-scope
bun add babel-flow-scope
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2017-10-05 |
| First published | 2017-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | James Kyle |
| Maintainers | thejameskyle |

## Links

- npm: https://www.npmjs.com/package/babel-flow-scope
- Repository: https://github.com/babel-utils/babel-flow-scope
- Homepage: https://github.com/babel-utils/babel-flow-scope#readme
- Issues: https://github.com/babel-utils/babel-flow-scope/issues
- npm.io page: https://npm.io/package/babel-flow-scope

## Recent versions

- 1.2.1 (latest) — 2017-10-05
- 1.2.0 — 2017-06-02
- 1.1.0 — 2017-06-02
- 1.0.0 — 2017-06-02

## README

# babel-flow-scope

> Collect [Flow](https://flow.org/) bindings in a given scope

```js
import type foo from "mod";
type baz<bar> = {};
```

```js
import {getFlowBindingsInScope} from 'babel-flow-scope';

getFlowBindingsInScope(path);
// {
//   foo: {
//     kind: 'import',
//     path: (Identifier)
//   },
//   bar: {
//     kind: 'param',
//     path: (TypeParameter)
//   },
//   baz: {
//     kind: 'declaration',
//     path: (Identifier)
//   }
// }
```

## API

#### `getFlowScopePath(path)`

Find the closest path to a Flow scope.

#### `getFlowBindingsInScope(path)`

Retreive all the Flow bindings in the local Flow scope.

#### `findFlowBinding(path, name)`

Search for a binding in the current scope and parent scopes.

---
_Source: https://npm.io/package/babel-flow-scope · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
