# @rql/parser

> > A Rql parser

Latest version **0.1.0** (published 2021-01-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rql/parser
pnpm add @rql/parser
yarn add @rql/parser
bun add @rql/parser
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-01-20 |
| First published | 2021-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 25.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | fbessou |

## Links

- npm: https://www.npmjs.com/package/@rql/parser
- npm.io page: https://npm.io/package/@rql/parser

## Recent versions

- 0.1.0 (latest) — 2021-01-20

## README

# @rql/parser
> A Rql parser

## Install

This package is not published yet.

## Scripts

- `yarn build` compile typescript files to .js files and emit type declarations
- `yarn watch` run compilation whenever a file changes

## Example usage

In the web console or in a node-js interpreter you can type:

```typescript
import {parse} from "@rql/parser"
const ast = parse("Any X WHERE X is Person");
console.log(ast);
```

It should output the following JSON:

```json
{
  "kind": "SearchQuery",
  "selection": [
    {
      "kind": "Variable",
      "identifier": {
        "kind": "Identifier",
        "name": "X"
      }
    }
  ],
  "restrictions": [
    {
      "kind": "TripletRestriction",
      "subject": {
        "kind": "Variable",
        "identifier": {
          "kind": "Identifier",
          "name": "X"
        }
      },
      "relation": {
        "kind": "Identifier",
        "name": "is"
      },
      "object": {
        "kind": "Identifier",
        "name": "Person"
      }
    }
  ]
}
```

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