vector-im-hydrogen-web/src/utils/enum.js

8 lines
161 B
JavaScript
Raw Normal View History

export function createEnum(...values) {
2020-04-19 19:02:10 +02:00
const obj = {};
for (const value of values) {
obj[value] = value;
}
return Object.freeze(obj);
}