iwmlib/3rdparty/systemjs/babel-helpers/defineEnumerableProperties.js
2019-03-21 09:57:27 +01:00

10 lines
254 B
JavaScript
Executable File

export default (function (obj, descs) {
for (var key in descs) {
var desc = descs[key];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, key, desc);
}
return obj;
});