# gql-get

> GraphQL query inspired getter utility function

Latest version **1.1.3** (published 2019-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install gql-get
pnpm add gql-get
yarn add gql-get
bun add gql-get
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2019-09-07 |
| First published | 2019-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8.9 |
| Dependencies | 0 |
| Unpacked size | 259.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Maintainers | emanuelschmitt |

## Links

- npm: https://www.npmjs.com/package/gql-get
- Repository: https://github.com/emanuelschmitt/gql-get
- Homepage: https://github.com/emanuelschmitt/gql-get#readme
- Issues: https://github.com/emanuelschmitt/gql-get/issues
- npm.io page: https://npm.io/package/gql-get

## Recent versions

- 1.1.3 (latest) — 2019-09-07
- 1.1.2 — 2019-09-05
- 1.1.1 — 2019-09-02
- 1.1.0 — 2019-09-01

## README

# gql-get

[![CircleCI](https://circleci.com/gh/emanuelschmitt/gql-get/tree/master.svg?style=svg)](https://circleci.com/gh/emanuelschmitt/gql-get/tree/master) [![codecov](https://codecov.io/gh/emanuelschmitt/gql-get/branch/master/graph/badge.svg)](https://codecov.io/gh/emanuelschmitt/gql-get)

![gql-get-logo](/assets/gql-get-logo.png "gql-get logo")


GraphQL Query inspired getter function to return values from objects including lists with same shape objects.

### Example
```ts
  import get from 'gql-get';

  const response = {
    data: [
      { type: 'User', name: 'Dennis'},
      { type: 'User', name: 'Fred'},
      { type: 'User', name: 'Boris'}
    ]
  }

  const names = get<string[]>(response, 'data.name');

  // > ['Dennis', 'Fred', 'Boris']
```

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