Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mix(...mixins){
- class Mix{};
- for (let mixin of mixins){
- copyProperties(Mix,mixin);
- copyProperties(Mix.prototype,mixin.prototype);
- }
- }
- function copyProperties(target,source){
- for (let key of Reflect.ownKeys(source)){
- if(key !== 'constructor' && key !== 'prototype' && key !== 'name'){
- let desc = Object.getOwnPropertyDescriptor(source,key);
- Object.defineProperty(target,key,desc);
- }
- }
- }
- class DistributedEdit extends mix(){}
Add Comment
Please, Sign In to add comment