Return the formats valid for mode.
mode
Returns a fresh array each call — never the live VALID_FORMATS_BY_MODE entry — so a caller that sorts/mutates the result in place cannot corrupt the shared constant for every subsequent call.
VALID_FORMATS_BY_MODE
Return the formats valid for
mode.Returns a fresh array each call — never the live
VALID_FORMATS_BY_MODEentry — so a caller that sorts/mutates the result in place cannot corrupt the shared constant for every subsequent call.