Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamesknelson/meteor-yaml
Meteor smart package for YAML parsing/generation
https://github.com/jamesknelson/meteor-yaml
Last synced: 13 days ago
JSON representation
Meteor smart package for YAML parsing/generation
- Host: GitHub
- URL: https://github.com/jamesknelson/meteor-yaml
- Owner: jamesknelson
- License: mit
- Created: 2012-11-20T13:28:07.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-29T06:18:31.000Z (over 11 years ago)
- Last Synced: 2023-04-10T02:16:06.892Z (over 1 year ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 2
- Watchers: 1
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YAML
This smart package lets you parse and generate YAML within a meteor app. It will also automatically load all .yaml files in your project, parse them into javascript objects, and make them available at `YAML.data`.
It is based on [yaml.js](https://github.com/jeremyfa/yaml.js) by jeremyfa.
## Installation
```
mrt add yaml
```## Usage
```javascript
YAML.parse(text);
```
Parses the YAML given by `text` and returns it as a javascript object.```javascript
YAML.stringify(array, inline, spaces);
```
Attempts to return the given array as a yaml string.### Parameters:
- `inline`: The level where you switch to inline YAML
- `spaces`: The number of spaces used for indentation