All files utils.js

100% Statements 7/7
100% Branches 6/6
100% Functions 5/5
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13    4x 38x     4x 17x   45x      
 
// compose :: (...Function) -> Function
export const compose = (...fns) =>
    fns.reduce((a, b) => (...args) => a(b(...args)));
 
// getMethods :: Class -> [String]
export const getMethods = Class =>
    Object.getOwnPropertyNames((Class || {}).prototype || {})
        .filter(key => (
            key !== 'constructor' &&
            Class.prototype[key] instanceof Function
        ));