Socket
Book a DemoInstallSign in
Socket

@axah/env-utils

Package Overview
Dependencies
Maintainers
10
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axah/env-utils

Environment nodeJS utils for microservices at AXA Healthcare switzerland.

latest
npmnpm
Version
3.0.0
Version published
Maintainers
10
Created
Source

@axah/env-utils

Environment nodeJS utils for microservices at AXA Healthcare switzerland.

Installing a release

Install @axah/env-utils using the following command:

yarn add @axah/env-utils

Usage

Here some examples.

import { parseBooleanFromEnv, parseDateFromEnv, parseStringFromEnv, parseIntegerFromEnv, parseFloatFromEnv } from '@axah/env-utils/lib/main';

export default {
  logLevel: parseStringFromEnv('LOG_LEVEL', 'debug'),
  enableQG: parseBooleanFromEnv('ENABLE_QG', true),
  sendContractDate: parseDateFromEnv('SEND_CONTRACT_DATE', new Date(Date.UTC(2020,0,1))),
  maxRetries: parseIntegerFromEnv('MAX_RETRIES', 5),
  confidenceLevelThreshold: parseIntegerFromEnv('CONFIDENCE_LEVEL_THRESHOLD', 0.95),
  clientCertificate: {
    pfxFilePath: parseStringFromEnv('CP_CERT_FILE', ''),
    passphraseFilePath: parseStringFromEnv('CP_CERT_PASSPHRASE_FILE', ''),
  },
};

FAQs

Package last updated on 28 Aug 2024

Did you know?

Socket

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.

Install

Related posts