@types/parse-env-string
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Installation

npm install --save @types/parse-env-string

Summary

This package contains type definitions for parse-env-string (https://github.com/watson/parse-env-string#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-env-string.

index.d.ts

/**
 * It takes a string and returns an object.
 * If given null or undefined an empty object is returned.
 * If given anything else, a TypeError is thrown.
 * An `Error` will also be thrown if the provided string doesn't contain valid environment variables.
 * E.g. if given the string `1a=b`, an error will be thrown because environment variables cannot have a digit as the first character.
 */
declare function parseEnvString(str: string | null | undefined): { [key: string]: string };

/**
 * Parse a string containing environment variables to a key/value object.
 */
export = parseEnvString;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Piotr Błażejewicz.

/@types/parse-env-string/

    Package Sidebar

    Install

    npm i @types/parse-env-string

    Weekly Downloads

    13

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    3.83 kB

    Total Files

    5

    Last publish

    Collaborators

    • types