UNPKG

433 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.enumeration = (targetVal, opts) => {
4 const results = [];
5 const { values } = opts;
6 if (!targetVal)
7 return results;
8 if (!values.includes(targetVal)) {
9 results.push({
10 message: `${targetVal} does not equal to one of ${values}`,
11 });
12 }
13 return results;
14};
15//# sourceMappingURL=enumeration.js.map
\No newline at end of file