'use strict'; export function create(obj, proto=Object.prototype) { const props = Object.keys(obj) .map((key) => [ key, { value: obj[key], enumerable: true } ]) .reduce((acc, [ key, value ]) => ({ ...acc, [key]: value }), {}); return Object.create(proto, props); };