Module: @kosko/env
This page is for @kosko/env
v2.0.
Previous API docs:
Interfaces
Variables
default
• default: Environment
Defined in
packages/env/src/index.node.ts:18
Functions
createAsyncEnvironment
▸ createAsyncEnvironment(): Environment
Returns a new asynchronized Environment
.
Returns
Defined in
packages/env/src/environment/async.ts:11
createAsyncLoaderReducers
▸ createAsyncLoaderReducers(loader
): Reducer
[]
Returns the default reducers which load environment variables asynchronously
using the specified loader
.
Parameters
Name | Type |
---|---|
loader | Loader |
Returns
Reducer
[]
Defined in
packages/env/src/environment/base.ts:69
createNodeCJSEnvironment
▸ createNodeCJSEnvironment(options?
): Environment
Returns a new Environment
which loads environment variables using Node.js's
require()
function.
Parameters
Name | Type |
---|---|
options | NodeEnvironmentOptions |
Returns
Defined in
packages/env/src/environment/node-cjs.ts:12
createNodeESMEnvironment
▸ createNodeESMEnvironment(options?
): Environment
Returns a new Environment
which loads environment variables using ECMAScript
module (ESM) import()
function.
Parameters
Name | Type |
---|---|
options | NodeEnvironmentOptions |
Returns
Defined in
packages/env/src/environment/node-esm.ts:12
createSyncEnvironment
▸ createSyncEnvironment(): Environment
Returns a new synchronized Environment
.
Returns
Defined in
packages/env/src/environment/sync.ts:11
createSyncLoaderReducers
▸ createSyncLoaderReducers(loader
): Reducer
[]
Returns the default reducers which load environment variables synchronously
using the specified loader
.
Parameters
Name | Type |
---|---|
loader | Loader |
Returns
Reducer
[]