Native Typescript Corn parser
  • TypeScript 98.9%
  • JavaScript 1.1%
Find a file
2026-01-03 15:00:01 +00:00
.idea initial commit 2025-07-31 16:45:27 +01:00
src test: simplify positive tester 2025-10-28 14:22:14 +00:00
test-suite@1e2662bfec chore: update test suite 2025-10-28 14:22:45 +00:00
.gitignore chore: ignore /dist 2025-12-30 11:07:50 +00:00
.gitmodules initial commit 2025-07-31 16:45:27 +01:00
babel.config.js chore: add eslint 2025-08-04 15:22:43 +01:00
eslint.config.mjs chore: add eslint 2025-08-04 15:22:43 +01:00
package.json chore(release): v0.11.1 2026-01-03 15:00:01 +00:00
pnpm-lock.yaml chore(deps): update glob 2025-12-30 11:01:16 +00:00
README.md docs(readme): update with published package 2025-12-30 11:19:18 +00:00
tsconfig.json build: generate .d.ts files 2026-01-03 14:59:54 +00:00

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 }