iwmlib/lib/3rdparty/systemjs/babel-helpers/defineEnumerableProperties.js

10 lines
254 B
JavaScript
Raw Permalink Normal View History

2019-04-05 10:09:27 +02:00
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;
});