# get_in_ppx

> get_in ppx for option chaining in reason

Latest version **2.0.1** (published 2019-12-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install get_in_ppx
pnpm add get_in_ppx
yarn add get_in_ppx
bun add get_in_ppx
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2019-12-18 |
| First published | 2018-11-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 47.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 40 |
| Author | Jared Forsyth |
| Maintainers | jaredly |
| Keywords | Reason, Graphql |

## Links

- npm: https://www.npmjs.com/package/get_in_ppx
- Repository: https://github.com/jaredly/get_in_ppx
- Homepage: https://github.com/jaredly/get_in_ppx#readme
- Issues: https://github.com/jaredly/get_in_ppx/issues
- npm.io page: https://npm.io/package/get_in_ppx

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2019-12-18
- 2.0.0 — 2019-12-17
- 1.0.2 — 2018-11-13

## README

# get_in ppx

An exploration of the ["safe call operators" pull-request](https://github.com/facebook/reason/pull/2142), implemented as a ppx.

## Installation

`npm i get_in_ppx`

bsconfig.json

```
"ppx-flags": ["get_in_ppx/ppx"]
```

## Operators
This ppx includes two operators, that are valid within the `[%get_in ]` form.

- `#??` is to be used when *both sides* are optional. E.g. the object on the left is optional, and the attribute you're getting out is also optional. e.g. `option({. "attr": option(int)})`
- `#?` is to be used when *only the object* is optional, but the attribute you're getting out is not. e.g. `option({. "attr": int})`

## Usage

```
/* some data with optional attributes in javascript objects (e.g. from graphql) */
let one = Some({"two": Some({"three": 4})});

let x: option(int) = [%get_in one#??two#?three];
```

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