
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@teamteanpm2024/ut-quia-ad
Advanced tools
Converts process.env
into a neatly packed object.
import config from '@teamteanpm2024/ut-quia-ad';
const myConfig = await config();
It turns the environment variables below...
API_PORT=3000
API_BASE_URL="http://api.myapp.com/"
API_AUTH_TOKEN=myauthtoken
API_USER_KEYS_0="key1"
API_USER_KEYS_1="key2"
API_USER_KEYS_2="key3"
...into the data below.
{
api: {
port: '3000',
baseUrl: 'http://api.myapp.com',
authToken: 'myauthtoken',
userKeys: [
'key1',
'key2',
'key3'
]
}
}
The isvalid package is build into the library and can be used to validate the configuration.
See the documentation for
isvalid
on how to format the schema.
Example
const myConfig = await config({
'port': {
type: Number,
required: true,
range: '-65535'
}
}, /* options = { defaults: { unknownKeys: 'allow' } } */);
The above example will throw an error if the data cannot be validated. It will, though, because of the way isvalid works, convert the port to a Number
.
See the isvalid documentation for available options.
The comment in the example is there to show what options config uses per default.
See license in LICENSE.
FAQs
@teamteanpm2024/ut-quia-ad ----
The npm package @teamteanpm2024/ut-quia-ad receives a total of 0 weekly downloads. As such, @teamteanpm2024/ut-quia-ad popularity was classified as not popular.
We found that @teamteanpm2024/ut-quia-ad demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.