UNPKG

@ou-imdt/utils

Version:

Utility library for interactive media development

16 lines (15 loc) 555 B
/** * List of supported fetch types. Each type corresponds to a method for retrieving data via fetch. * 'raw' means using the standard `fetch` method. * @type {string[]} */ export const supportedFetchTypes = ['raw', 'blob', 'json', 'text', 'xml']; /** * Checks if a given value is a supported fetch type. * * @param {string} value - The value to be checked. * @returns {boolean} True if the value is a supported fetch type, otherwise false. */ export default function isSupportedFetchType(value) { return supportedFetchTypes.includes(value); }