# @gram-data/gram-parse

> parse text into gram data graphs

Latest version **0.3.11** (published 2021-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gram-data/gram-parse
pnpm add @gram-data/gram-parse
yarn add @gram-data/gram-parse
bun add @gram-data/gram-parse
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.11 |
| Published | 2021-01-22 |
| First published | 2020-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 6 |
| Unpacked size | 703.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 26 |
| Author | Andreas Kollegger |
| Maintainers | akollegger |
| Keywords | graph, neo4j, gram, unified |

## Links

- npm: https://www.npmjs.com/package/@gram-data/gram-parse
- Repository: https://github.com/gram-data/gram-js
- Homepage: https://gram-data.github.io/gram-js/api/modules/gram-parse
- Issues: https://github.com/gram-data/gram-js/issues
- npm.io page: https://npm.io/package/@gram-data/gram-parse

## Dependencies (6)

- [moo](https://npm.io/package/moo.md) ^0.5.1
- [vfile](https://npm.io/package/vfile.md) ^4.2.1
- [nearley](https://npm.io/package/nearley.md) ^2.20.1
- [unified](https://npm.io/package/unified.md) ^9.2.0
- [@gram-data/gram-ast](https://npm.io/package/@gram-data/gram-ast.md) ^0.3.11
- [@gram-data/gram-builder](https://npm.io/package/@gram-data/gram-builder.md) ^0.3.11

## 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

- 0.3.11 (latest) — 2021-01-22
- 0.4.0-alpha.8 (alpha) — 2021-01-22
- 0.3.10 — 2021-01-22
- 0.4.0-alpha.6 — 2021-01-22
- 0.4.0-alpha.5 — 2021-01-19
- 0.4.0-alpha.4 — 2021-01-16
- 0.4.0-alpha.3 — 2021-01-15
- 0.4.0-alpha.2 — 2021-01-15
- 0.4.0-alpha.1 — 2021-01-15
- 0.3.9 — 2021-01-13
- 0.3.9-alpha.2 — 2020-12-19
- 0.3.8 — 2020-12-16
- 0.3.7 — 2020-12-16
- 0.3.6 — 2020-12-16
- 0.3.5 — 2020-12-10
- … 28 more at https://npm.io/package/@gram-data/gram-parse/versions

## README

From text literal `(a)-->(b)` to a gram AST. 

## How to gram-parse

### Install:

``` bash
npm install @gram-data/gram-parse
```

### Parse text into an AST:

``` TypeScript
import { toAST } from '@gram-data/gram-parse'; 

const src = '(a)-->(b)';
const parsed = toAST(src);
```

### Inspect AST using [unist-util-inspect](https://github.com/syntax-tree/unist-util-inspect):

``` TypeScript
const inspect = require('unist-util-inspect');

console.log(inspect(parsed));
```

## Next Steps

- Transform to js objects using [[gram-value]]
- Write back to a string using [[gram-stringify]]
- Introspect the AST using [[gram-ast]]

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