all of deno standard library.
Deno.readTextFile
nothing to add via CLI.
create 2 files :
test-via-deno-modules.ts
;config.yaml
; ( sample test files can be found inside test/
)// this assumes the latest version import { dallmo_util_yaml } from "https://deno.land/x/dallmo_util_yaml/mod.ts"; const config_file = "config.yaml"; const config_obj = await dallmo_util_yaml( config_file ); console.log( config_obj );
deno run --allow-read test-via-deno-modules.ts
deno add @dallmo/util-yaml
test-via-jsr.ts
;config.yaml
; ( sample test files can be found inside test/
)import { dallmo_util_yaml } from "@dallmo/util-yaml"; const config_file = "config.yaml"; const config_obj = await dallmo_util_yaml( config_file ); console.log( config_obj );
deno run --allow-read test-via-jsr.ts
to run test codes :
[root]/
;deno task test-deno
;deno task test-jsr
;Add Package
deno add jsr:@dallmo/util-yaml
Import symbol
import * as util_yaml from "@dallmo/util-yaml";
Import directly with a jsr specifier
import * as util_yaml from "jsr:@dallmo/util-yaml";
Add Package
pnpm i jsr:@dallmo/util-yaml
pnpm dlx jsr add @dallmo/util-yaml
Import symbol
import * as util_yaml from "@dallmo/util-yaml";
Add Package
yarn add jsr:@dallmo/util-yaml
yarn dlx jsr add @dallmo/util-yaml
Import symbol
import * as util_yaml from "@dallmo/util-yaml";
Add Package
npx jsr add @dallmo/util-yaml
Import symbol
import * as util_yaml from "@dallmo/util-yaml";
Add Package
bunx jsr add @dallmo/util-yaml
Import symbol
import * as util_yaml from "@dallmo/util-yaml";