moml
v1.0.2
Published
Minimalist Object Markup Language.
Downloads
15
Maintainers
Readme
MOML
Minimalist Object Markup Language.
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