0.0.4 • Published 6 days ago

json2gbnf v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

JSON2GBNF

A library for parsing JSON schema definitions into .gbnf grammar files in Javascript.

Install

npm install json2gbnf

Usage

import JSON2GBNF from 'json2gbnf';

const grammar = JSON2GBNF({
  type: 'object',
  properties: {
    number: { type: 'number' },
    street_name: { type: 'string' },
    street_type: { enum: ['Street', 'Avenue', 'Boulevard'] },

  },
});

console.log(grammar); // GBNF grammar
0.0.4

6 days ago

0.0.3

10 days ago

0.0.2

12 days ago

0.0.1

12 days ago