function classExtends (context, parentConstructor, ...superArgs) { let parent = parentConstructor.call(context, ...superArgs) for(let key in parent) { let value = parent[key] if(typeof value == 'function') { context[key] = value.bind(context) } else { context[key] = value } } } global.classExtends = classExtends