blob: a1df43e46469747f1ed84876d33c4c9e60c0ddd3 [file] [log] [blame]
"use strict";
const enumerationValues = new Set(["auto", "instant", "smooth"]);
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 ScrollBehavior`);
}
return string;
};