This package has been deprecated

Author message:

Package renamed and move to org. Use @bavary/core

bavary
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

Logo


gzip size brotli size Coverage Status Build Status Download count Current version Support me

Getting Started

⚠ Bavary is currently not stable and heavily under development. The API might change and all 0.0.x releases should be treated as test / preview releases.

Install via npm:

$ npm install bavary

Install via yarn:

$ yarn add bavary

Include directly via jsdelivr:

<script src="https://cdn.jsdelivr.net/npm/bavary/lib/bavary.js"></script>

Usage

import {compile} from 'bavary';
 
// Compile definitions
const parse = compile(`
    entry ['A' | 'B']
`);
 
// Use compiled definitions to parse a string
const parsed = parse('A');
 
// Logs "A" to the console
console.log(parsed);

The function compile accepts as second argument a config object;

Getting started

Check out the documentation to get started or jump directly into one of the examples:

  1. string - Parsing strings and support escaped quotes.
  2. hex-color - Parsing different kinds of color types in the hexadecimal format.
  3. number - Parsing floats and integers with optional scientific notation.

CLI

Usage:

$ bvc [files] [options...]

Where files can be any kind of directory, file or glob-pattern. If no output file is specified (via --output) it'll print the result to the console.

Flag Explanation Example
-w, --watch Watches source-files matched by [files] $ bva src/**/*.bv input.txt --watch
-v, --version Prints the current version $ bva --version
-o, --output <file> Write results to disk $ bva --output result.json
-p, --prettify Prettify result (Works only in combination with --output) $ bva --output result.json --prettify
-h, --help Shows usage info $ bva --help

Readme

Keywords

Package Sidebar

Install

npm i bavary

Weekly Downloads

4

Version

0.0.12

License

MIT

Unpacked Size

303 kB

Total Files

77

Last publish

Collaborators

  • simonwep