Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Docs: Add exposed public methods in README #10

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,22 @@ console.log yaml.dump
</script>
```

#### API

| Method | Description |
|-----------------|---------------------------------------------------------------------------------------------------------------------------|
| `scan` | Scan a YAML stream and produce scanning tokens. |
| `parse` | Parse a YAML stream and produce parsing events. |
| `compose` | Parse the first YAML document in a stream and produce the corresponding representation tree. |
| `compose_all` | Parse all YAML documents in a stream and produce corresponding representation trees. |
| `load` | Parse the first YAML document in a stream and produce the corresponding Javascript object. |
| `load_all` | Parse all YAML documents in a stream and produce the corresponing Javascript object. |
| `emit` | Emit YAML parsing events into a stream. If stream is falsey, return the produced string instead. |
| `serialize` | Serialize a representation tree into a YAML stream. If stream is falsey, return the produced string instead. |
| `serialize_all` | Serialize a sequence of representation tress into a YAML stream. If stream is falsey, return the produced string instead. |
| `dump` | Serialize a Javascript object into a YAML stream. If stream is falsey, return the produced string instead. |
| `dump_all` | Serialize a sequence of Javascript objects into a YAML stream. If stream is falsey, return the produced string instead. |

License
---

Expand Down
16 changes: 16 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "yaml-js",
"version": "0.1.0",
"description": "Pure Javascript YAML loader and dumper, ported from PyYAML",
"main": "yaml.js",
"repository": {
"type": "git",
"url": "http://github.com/connec/yaml-js.git"
},
"devDependencies": {
"coffee-script": "1.6.x",
"plantation": "0.0.8",
"squash": "0.0.12"
},
"license": "WTFPL"
}