Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
function configLoad
import { configLoad } from "https://deno.land/x/simple_utility@v0.5.2/src/json.deno.ts";

Wrapper function of jsonLoad(). Config file path is fixed ${Deno.mainModule}/config.json.

Examples

Example 1

import dconfig from "./config.json" assert {type: "json"};
const config = await configLoad(dconfig);

Type Parameters

T extends unknown

Parameters

defaultv: T

Returns

Promise<T>