moml

1.0.2 • Public • Published

MOML

Minimalist Object Markup Language.

Build Status Test Coverage Code Climate

Dependency Status devDependencies Status

Standard - JavaScript Style Guide

Installation

$ npm install moml

Please also read the short MOML Spec!

Usage

const moml = require('moml')
 
let data = `
Title:      My First Day with MOML
Author:     Sam Text
Date:       12/06/2016
 
Tags[]:     explosive, story
 
Remarks:    This is a multiline remark.
            Use the same indentation _
            on subsequent lines. 
`
 
let result = moml.parse(data)
console.log(JSON.stringify(result, null, 4))
 
/* 
{
    "title": "My First Day with MOML",
    "author": "Sam Text",
    "date": "12/06/2016",
    "tags": [
        "explosive", 
        "story"
    ],
    "remarks": "This is a multiline remark.\nUse the same indentation on subsequent lines."
}
*/

License

ISC

Package Sidebar

Install

npm i moml

Weekly Downloads

11

Version

1.0.2

License

ISC

Last publish

Collaborators

  • nodexo