gram
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:
- see examples
Index
Functions
Functions
parse
▸ Const
parse(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