1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-11 18:17:48 -05:00
denoland-deno/std/encoding/_yaml/example/parse.ts
Nayeem Rahman f184332c09
BREAKING(std): reorganization (#5087)
* Prepend underscores to private modules
* Remove collectUint8Arrays() It would be a misuse of Deno.iter()'s result.
* Move std/_util/async.ts to std/async
* Move std/util/sha*.ts to std/hash
2020-05-09 08:34:47 -04:00

19 lines
455 B
TypeScript

// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { parse } from "../../yaml.ts";
const result = parse(`
test: toto
foo:
bar: True
baz: 1
qux: ~
`);
console.log(result);
const expected = '{ test: "toto", foo: { bar: true, baz: 1, qux: null } }';
if (Deno.inspect(result) === expected) {
console.log("Output is as expected.");
} else {
console.error("Error during parse. Output is not as expect.", expected);
}