| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 13x 58x 133x |
import { match, listToObject, isConstructor } from './common-utils';
// Tiny Enum to bypass the circular dependency shithole
const Enum = typeNames => ({
match,
isConstructor: isConstructor(typeNames),
...listToObject(
name => name,
name => (...args) => ({ name, args }),
typeNames,
),
});
export default Enum;
|