UNPKG

@liplum/env

Version:

Reading and parsing environment variables from "process.env"

18 lines 484 B
import { EnvMixin } from "./shared.js"; export class FloatEnv extends EnvMixin { getOrNull = () => { const raw = this.env.getOrNull(); if (raw === undefined) { return this.getDefaultValue(); } return parseFloat(raw); }; get = () => { const result = this.getOrNull(); if (result === undefined) { throw this.missingEnvError(); } return result; }; } //# sourceMappingURL=float.js.map