• Parse a String into an Object using basic env syntax

    This parses line by line so an invalid line will just be skipped

    Parameters

    • input: string

    Returns Record<string, string>

    Example

    import { string } from "@rjweb/utils"

    string.env('K=12') // {K:'12'}
    string.env('E="400"') // {E:'400'}
    string.env('some invalid string') // {}

    Since

    1.10.4

    Supports

    nodejs, browser