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

7 lines
168 B
JavaScript
Raw Normal View History

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