@appscode/json2yaml

0.1.2 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    10
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    10
  • 0.1.1
    2
  • 0.1.0
    9

Package Sidebar

Install

npm i @appscode/json2yaml

Weekly Downloads

12

Version

0.1.2

License

MIT

Last publish

Collaborators

  • mohincse
  • s4k1b
  • tamalsaha