@appscode/json2yaml

Javascript JSON to YAML converter

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
31Nov 6, 2018May 8, 2017Minified + gzip package size for @appscode/json2yaml in KB

Readme

json2yaml

Converts json or simple javascript objects into a yaml format.

Installation

Include json2yaml.js (in src directory) via script tag and then run:

var obj  = { hello: 'world', hello2: [ 'hello', 'world' ] };
var yaml = json2yaml(obj);
console.log(yaml);

This outputs

hello: world
hello2:
  - hello
  - world

Acknowledgement

For string conversion, we're using yaml.js's Escaper and Pattern.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.