# read.yml
DENO_ENV: ${{DENO_ENV}}
// read.ts
import { readYaml } from 'https://deno.land/x/garn_yaml@0.2.1/mod.ts';
import { assertEquals } from 'https://deno.land/std@0.90.0/testing/asserts.ts';
const yamlObject = await readYaml('./read.yml');
assertEquals(typeof yamlObject, 'object');
assertEquals(yamlObject.DENO_ENV, 'development');
DENO_ENV=development deno run read.ts --allow-read --allow-env
// write.ts
import { writeYaml } from 'https://deno.land/x/garn_yaml@0.2.1/mod.ts';
const yamlText = await writeYaml('./write.yml', { a: 1 }); // a: 1
# write.yml
a: 1