vanilla-lang

1.5.3 • Public • Published

Vanilla

Vanilla is a elegant json inspired configuration/markup language

Differences

Types: numbers, strings, booleans, null, objects

Rules

  1. The language can only go 3 layers down (root -> object/variable/array -> array/variable)
  2. Objects, variables, arrays can not contain an item of the same type, recursion does not exist
  3. Arrays can not contain variables only values
  4. Mixins can only be used in variables

Installation

npm install -g vanilla-lang

Usage

root
  @test "this is a mixin"
  'this is a example comment'
  'this is a example
  multiline comment'
  user
    password @test
    inventory
      - "item 1"
      - "item 2"
      - "item 3"

In the javascript code:

const vanilla = require("vanilla-lang");
const config = vanilla.load("config.va");
console.log(config.user);

Package Sidebar

Install

npm i vanilla-lang

Weekly Downloads

1

Version

1.5.3

License

ISC

Unpacked Size

37.1 kB

Total Files

7

Last publish

Collaborators

  • pyxelx