scratch – Blame information for rev 66

Subversion Repositories:
Rev:
Rev Author Line No. Line
66 office 1  
2 # YAML2
3 <a href='https://travis-ci.org/apigee/yaml2'><img src='https://travis-ci.org/apigee/yaml2.svg'/></a>
4  
5 YAML2 is a fork of [JS-YAML](https://github.com/visionmedia/js-yaml) which adds functionality to get an abstract syntax tree out of a YAML string.
6  
7 CommonJS JavaScript YAML parser, fast and tiny. Although this implementation
8 does not currently support the entire YAML specification, feel free to
9 fork the project and submit a patch :)
10  
11 # Usage
12  
13  
14 #### Get JavaScript object out of a YAML string
15 require('yaml2').eval(string_of_yaml)
16 #### Get Abstract Syntax Tree(AST) out of a YAML string
17 require('yaml2').ast(string_of_yaml)
18  
19 # Currently Supports
20  
21 * Comments
22 * Sequences (arrays)
23 * Maps (hashes)
24 * Inline sequences
25 * Inline maps
26 * Nesting
27 * Primitive scalars (integers, floats, booleans, etc)
28 * Extended bools (enabled, disabled, yes, no, on, off, true, false)
29  
30 ## Installation
31  
32  
33 ### Via NPM
34 $ npm install yaml2
35  
36 ### Via Bower
37 $ bower install yaml_2
38  
39 # Testing
40  
41 Run:
42  
43 $ npm test
44  
45 ### Known bugs and missing features
46  
47 * Inline commnets: `key: value # this is value`
48 * Inline hash with key quoted: `hash: {"me": 1}`
49  
50 # License
51  
52 (The MIT License)
53  
54 Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>
55  
56 Copyright (c) 2014 Mohsen Azimi(Apigee) <mazimi@apigee.com>
57  
58 Permission is hereby granted, free of charge, to any person obtaining
59 a copy of this software and associated documentation files (the
60 'Software'), to deal in the Software without restriction, including
61 without limitation the rights to use, copy, modify, merge, publish,
62 distribute, sublicense, and/or sell copies of the Software, and to
63 permit persons to whom the Software is furnished to do so, subject to
64 the following conditions:
65  
66 The above copyright notice and this permission notice shall be
67 included in all copies or substantial portions of the Software.
68  
69 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
70 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
71 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
72 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
73 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
74 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
75 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.