mirror of
https://github.com/azure/setup-kubectl.git
synced 2026-12-05 20:11:53 +00:00
7f7e5ba5ea
Co-authored-by: Oliver King <oking3@uncc.edu>
13 lines
423 B
JavaScript
13 lines
423 B
JavaScript
"use strict";
|
|
|
|
const enumerationValues = new Set(["loading", "interactive", "complete"]);
|
|
exports.enumerationValues = enumerationValues;
|
|
|
|
exports.convert = function convert(value, { context = "The provided value" } = {}) {
|
|
const string = `${value}`;
|
|
if (!enumerationValues.has(string)) {
|
|
throw new TypeError(`${context} '${string}' is not a valid enumeration value for DocumentReadyState`);
|
|
}
|
|
return string;
|
|
};
|