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 )); |