/
mod.ts
53 lines (51 loc) · 1.36 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
/**
* {@linkcode parse} and {@linkcode stringify} for handling
* [YAML](https://yaml.org/) encoded data.
*
* Ported from
* [js-yaml v3.13.1](https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da)
*
* If your YAML contains multiple documents in it, you can use {@linkcode parseAll} for
* handling it.
*
* To handle `regexp`, and `undefined` types, use {@linkcode EXTENDED_SCHEMA}.
* You can also use custom types by extending schemas.
*
* ## :warning: Limitations
* - `binary` type is currently not stable.
*
* For further examples see https://github.com/nodeca/js-yaml/tree/master/examples.
* @example
* ```ts
* import {
* parse,
* stringify,
* } from "https://deno.land/std@$STD_VERSION/yaml/mod.ts";
*
* const data = parse(`
* foo: bar
* baz:
* - qux
* - quux
* `);
* console.log(data);
* // => { foo: "bar", baz: [ "qux", "quux" ] }
*
* const yaml = stringify({ foo: "bar", baz: ["qux", "quux"] });
* console.log(yaml);
* // =>
* // foo: bar
* // baz:
* // - qux
* // - quux
* ```
*
* @module
*/
export * from "./parse.ts";
export * from "./stringify.ts";
export * from "./type.ts";
export * from "./schema/mod.ts";