Repository
Current version released
4 years ago
Dependencies
std
gar-yaml: load yaml interpolating env variables
Usage
# test.yml
DENO_ENV: ${{DENO_ENV}}
// index.ts
import { loadYaml } from 'https://deno.land/x/garn_yaml@v0.1.4/mod.ts';
import { assertEquals } from 'https://deno.land/std@0.79.0/testing/asserts.ts';
const yamlObject = await loadYaml('./test.yml');
assertEquals(typeof yamlObject, 'object');
assertEquals(yamlObject.DENO_ENV, 'development');
DENO_ENV=development deno run index.ts --allow-read --allow-env