2026-01-22 21:21:56 +05:30

4 lines
273 B
JavaScript

import { fromStatic as convertToProvider } from "@smithy/property-provider";
const isFunction = (func) => typeof func === "function";
export const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : convertToProvider(defaultValue);