Ikagaka/named-kernel-manager.js

View on GitHub
lib/mixin.js.map

Summary

Maintainability
Test Coverage
{"version":3,"sources":["lib/mixin.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;kBAAwB;;;;AAAT,SAAS,UAAT,CAAoB,SAApB,EAA+B,MAA/B,EAAsC;AACjD,QAAM,YAAa,OAAO,MAAP,KAAmB,UAApB,GACE,OAAO,SADT,GAEE,MAFpB;;AADiD;AAAA;AAAA;;AAAA;AAKjD,wDAAiB,uBAAgB,SAAhB,CAAjB,4GAA4C;AAAA,gBAAlC,GAAkC;;;AAExC,gBAAG,QAAQ,aAAX,EAA0B;;AAE1B,gBAAM,aAAa,wCAAgC,SAAhC,EAA2C,GAA3C,CAAnB;;AAEA,uBAAW,YAAX,GAA0B,IAA1B;AACA,uBAAW,UAAX,GAA0B,KAA1B;AACA,gBAAG,WAAW,cAAX,CAA0B,UAA1B,CAAH,EAAyC;AACrC,2BAAW,QAAX,GAAsB,IAAtB;AACH;;AAED,0CAAsB,UAAU,SAAhC,EAA2C,GAA3C,EAAgD,UAAhD;AACH;AAlBgD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBpD","file":"mixin.js","sourcesContent":["export default function mixinClass(baseClass, target){\r\n    const targetObj = (typeof(target) === \"function\")\r\n                      ? target.prototype\r\n                      : target;\r\n\r\n    for(const key of Reflect.ownKeys(targetObj)){\r\n        // コンストラクタは(相手にするのが面倒くさすぎるので)無視する\r\n        if(key === \"constructor\") continue;\r\n\r\n        const descriptor = Object.getOwnPropertyDescriptor(targetObj, key);\r\n\r\n        descriptor.configurable = true;\r\n        descriptor.enumerable   = false;\r\n        if(descriptor.hasOwnProperty(\"writable\")){\r\n            descriptor.writable = true;\r\n        }\r\n\r\n        Object.defineProperty(baseClass.prototype, key, descriptor);\r\n    }\r\n}\r\n"]}