Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 374 Bytes

File metadata and controls

21 lines (12 loc) · 374 Bytes

Corn.JS

Native Typescript implementation of the Corn parser.

This is compliant with the (currently unfinished) v0.11 spec.

Installation

Add the @cornjs/parser package.

Usage

import { parse } from '@cornjs/parser';

const corn = "{ let $foo = 42 } in { value = $foo }";
const res = parse(corn);

if(res.ok) console.log(res.value); // { value: 42 }