Skip to content

Standalone JavaScript YAML Parser & Encoder. You don't need any javascript framework to use it. Mainly inspired from sfYaml Library (part of the php Symfony components).

License

Notifications You must be signed in to change notification settings

vara855/yaml.js-standalone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yaml.js

Standalone JavaScript YAML Parser & Encoder. You don't need any javascript framework to use it.

Mainly inspired from sfYaml Library (part of the php Symfony components).

How to use

Import yaml.js in your html page:

<script type="text/javascript" src="yaml.js"></script>

Parse yaml string:

nativeObject = YAML.decode(yamlString);

Load yaml file:

nativeObject = YAML.load('file.yml');

Load yaml file (asynchronous):

YAML.load('file.yml', function(result)
{
  nativeObject = result;
});

Dump native object into yaml string:

yamlString = YAML.encode(nativeObject);

About

Standalone JavaScript YAML Parser & Encoder. You don't need any javascript framework to use it. Mainly inspired from sfYaml Library (part of the php Symfony components).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.0%
  • HTML 1.8%
  • Shell 0.2%