0.1.5 • Published 6 years ago

oyaml v0.1.5

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

OYAML: One-line YAML

OYAML is a YAML-like notation syntax for objects with very flexible whitespace. It's relatively human-readable and human-writable, while being compatible with a one-line-per-record data format, much like JSON Lines.

Installation

npm install oyaml

Usage

const { parse, stringify } = require('oyaml')

const str = 'message:hi "longer message":"Hello there!" number:4.3 list:[a, b, thing:stuff]'
const obj = parse(str)
/** 
{
  "message": "hi",
  "longer message": "Hello there!",
  "number": 4.3,
  "list": [
    "a",
    "b",
    {
      "thing": "stuff"
    }
  ]
}
**/

const oyaml = stringify(obj)
// message:hi "longer message":"Hello there!" number:4.3 list:[a, b, thing:stuff]
0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago