All files ArgLessEnum.js

100% Statements 5/5
100% Branches 0/0
100% Functions 4/4
100% Lines 3/3
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;