gram


gram.js API

Globals / gram

Package: gram

gram

Gram is a textual format for data graphs.

How to gram

Node.js:

const gram = require('@gram-data/gram');

const src = "(a)-->(b)";
const p = gram.parse(src);
console.log(gram.toGram(p));

TypeScript:

import gram from '@gram-data/gram'

const src = "(a)-->(b)";
const p = gram.parse(src);
console.log(gram.toGram(p));

Vanilla javascript in browser:

Index

Functions

Functions

parse

Constparse(src: VFileCompatible): GramSeq

Defined in packages/gram/src/index.ts:24

Parse text into an ast.

Parameters:

Name Type Description
src VFileCompatible gram formatted text

Returns: GramSeq