Sha256: 6e59f7af169ad0b57b9481d36074cf125c94db0d610d62a8d606aba9bc71ed7f
Contents?: true
Size: 370 Bytes
Versions: 83
Compression:
Stored size: 370 Bytes
Contents
export default function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
Version data entries
83 entries across 82 versions & 12 rubygems