@karmaniverous/get-dotenv
    Preparing search index...

    Function parseVarsPairs

    • Split a --vars-style string into ordered [key, value] pairs, keeping every occurrence of a repeated key.

      The string is first split into pairs with VarsSyntax.varsDelimiter / VarsSyntax.varsDelimiterPattern (default: a single space), then each pair is split at its first assignor with VarsSyntax.varsAssignor / VarsSyntax.varsAssignorPattern (default: '='), so the value may itself contain the assignor. A pair with no assignor yields undefined for its value, and a pair with an empty key is dropped.

      Unlike getDotenvCliOptions2Options's vars normalization (which de-duplicates pairs into an object), this keeps the full ordered list, including duplicates, so a caller that needs to collect several values for one key (e.g. a plugin's --vars VAR=keyName option collecting several key names under VAR) can do so.

      Parameters

      • vars: string

        The raw --vars-style string, e.g. "A=1 B=2".

      • syntax: VarsSyntax = {}

        Delimiter/assignor overrides; defaults match the root --vars option.

      Returns [string, string | undefined][]

      Ordered [key, value] pairs, duplicates included, empty keys dropped.