UNPKG

doctype

Version:

Information for HTML doctypes

32 lines (31 loc) 886 B
/** * Get a doctype from a name. * * @param {number|string} name * Fuzzy doctype name which is stripped from white space, casing, fractional * part of version, `'HTML'` or `'XHTML'` prefix, and whose suffixes are * normalised (`Transitional` to `t`). * @returns {string|null} * Doctype string when found. */ export function doctype(name: number | string): string | null export const doctypes: { 'HTML 5': string 'HTML 4.01 Strict': string 'HTML 4.01 Transitional': string 'HTML 4.01 Frameset': string 'HTML 3.2': string 'HTML 2.0': string 'XHTML 1.0 Strict': string 'XHTML 1.0 Transitional': string 'XHTML 1.0 Frameset': string 'XHTML 1.1': string 'XHTML Basic 1.1': string 'XHTML Basic 1.0': string 'MathML 2.0': string 'MathML 1.01': string 'SVG 1.0': string 'SVG 1.1 Full': string 'SVG 1.1 Basic': string 'SVG 1.1 Tiny': string }