Parses a comma-separated allowed-types mask into an AllowedFileTypes object.
The format mirrors the HTML <input accept> attribute:
<input accept>
.ext
type/subtype
application/json
type/*
image/*
const types = parseAllowedTypes(".ts, .tsx, image/*"); Copy
const types = parseAllowedTypes(".ts, .tsx, image/*");
Parses a comma-separated allowed-types mask into an AllowedFileTypes object.
The format mirrors the HTML
<input accept>attribute:.ext— file extension (case-insensitive, leading dot optional)type/subtype— exact MIME type, e.g.application/jsontype/*— MIME wildcard, e.g.image/*