Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

damon2

adrianturcev685MPL-2.02.4.12

A JSON shorthand

language, notation, map

readme

DAMON: A Map-Oriented Notation

A JSON-shorthand that:

Demo

Hello, human!

Syntax

See language_reference.md

Use Cases

  • Wiki Data-entry
  • Software Design
  • Interactive Documents

Installation

Node:

npm install damon2

Building

npm run watch # dev
npm run build # distribuable

Usage

Core methods:

const Damon = require('damon2');
let damon = new Damon();
let damonString = `
    - {}
        - key: "value"`;

console.log(damon.damonToJSON(damonString));
// {
//     "key": "value"
// }

console.log(damon.jsonToDAMON(damon.damonToJSON(damonString)));
// - {}
//     - key: "value"

console.log(damon.damonToMap(damonString));
// Map(1) {"key" => "value"}

Attributions

Built on:

Going further

License

Copyright © 2024 Adrian Turcev

Licensed under the MPL-2.0 license

changelog