blob: b0a05e630c30e1ddec206e0b77dcf8b2bd484f1b [file] [log] [blame]
"use strict";
const enumerationValues = new Set(["blob", "arraybuffer"]);
exports.enumerationValues = enumerationValues;
exports.convert = function convert(value, { context = "The provided value" } = {}) {
const string = `${value}`;
if (!enumerationValues.has(value)) {
throw new TypeError(`${context} '${value}' is not a valid enumeration value for BinaryType`);
}
return string;
};