Skip to content

A collections of parsers and parser combinators written in Typescript. Currently supports only Deno

Notifications You must be signed in to change notification settings

ikezedev/jsparsers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSParsers

Better docs coming!

A collections of parsers and parser combinators written in Typescript

Parsers

  • JSON parser

Parser combinators

  • oneOf

    oneOf(...Parser<T | U | V | ...>[]): Parser<T | U | V>
  • oneOrMore

    oneOrMore(Parser<T>): Parser<T[]>
  • inOrder

    inOrder(Parser<T>, Parser<U>): Parser<Pair<T, U>>
    inOrder(Parser<T>, Parser<U>, Parser<V>): Parser<Triple<T, U, V>>
  • separatedBy

    separatedBy(Parser<T>, separator: Parser<U>): Parser<T[]>
  • surroundedBy

    surroundedBy(start: Parser<U>, Parser<T>, end: Parser<V>): Parser<T[]>

Run Test

Ensure you have Deno installed

  • Run deno task test to run all tests except the tc39 tests
  • Run deno task test:tc39 to run tc39 compliance tests for json parser

About

A collections of parsers and parser combinators written in Typescript. Currently supports only Deno

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published