Skip to main content
Module

x/simple_utility/mod.ts>configLoad

Useful snippet collection.
Go to Latest
function configLoad
import { configLoad } from "https://deno.land/x/simple_utility@v1.3.6/mod.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);

Returns

Promise<T>