Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
/ meteor-yml Public archive

NO LONGER MAINTAINED - js-yml packed for meteor

License

Notifications You must be signed in to change notification settings

udondan/meteor-yml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yml

NO LONGER MAINTAINED

A YAML 1.2 parser and serializer for Meteor. Converts YAML files to JSON and JS objects to YAML.

This package packs js-yaml 3.2.2 for Meteor. See the online demo for the capabilities of this packages, including anchors, references and hash merging.

##Installation

meteor add udondan:yml

##Quick examples

###Convert YAML file to JSON

var fs = Npm.require('fs');

try {
  var data = YAML.safeLoad(fs.readFileSync('/path/to/file.yml', 'utf8'));
  console.log(data);
} catch (e) {
  console.log(e);
}

###Convert JS object to YAML

var data = {
  "some": "data"
}

var yml = YAML.safeDump(data);
console.log(yml);

Full API documentation on the github page of js-yaml.

##License: MIT

About

NO LONGER MAINTAINED - js-yml packed for meteor

Resources

License

Stars

Watchers

Forks

Packages

No packages published