(format: string)
| 75 | // and the shorthands `text` and `url` to be replaced with their MIME types. |
| 76 | // https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-setdata |
| 77 | function normalizeFormat(format: string) { |
| 78 | const type = toAsciiLowercase(format) |
| 79 | return type === 'text' |
| 80 | ? 'text/plain' |
| 81 | : type === 'url' |
| 82 | ? 'text/uri-list' |
| 83 | : type |
| 84 | } |
| 85 | |
| 86 | function getTypeMatcher(type: string, exact: boolean) { |
| 87 | const [group, sub] = type.split('/') |
no test coverage detected