Function attributesAsObject

  • Return a new object of key value pairs given an array of attributes.

    Parameters

    • attrs: Attr[]

      An array of attributes

    Returns Record<string, string | true>

    An object of key value pairs, or key -> true for boolean attributes