You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
379 B
13 lines
379 B
"use strict";
|
|
|
|
const enumerationValues = new Set(["blob", "arraybuffer"]);
|
|
module.exports = {
|
|
enumerationValues,
|
|
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;
|
|
}
|
|
};
|
|
|