instagrammar

1.0.7 • Public • Published

InstaGrammar

InstaGrammar is a Javascript library that generates a random sentence according to a grammar.

A grammar is a set of syntactic rules written in a very easy to read and understand language.

Installation

npm install instagrammar

Usage

var instagrammar = require("instagrammar")

var grammar = "$start = Hello (World | Universe);"
var ig = new instagrammar.InstaGrammar(grammar);
var output = ig.generate();

// output is either "Hello World" or "Hello Universe".
// check home page for tutorial and syntax

Manual

Check http://instagrammar.surge.sh/

/instagrammar/

    Package Sidebar

    Install

    npm i instagrammar

    Weekly Downloads

    3

    Version

    1.0.7

    License

    ISC

    Unpacked Size

    1.42 MB

    Total Files

    35

    Last publish

    Collaborators

    • ezeffiro