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

Version Path
optimacms-0.1.61 spec/dummy/node_modules/@babel/runtime/helpers/esm/defaults.js
disco_app-0.18.0 test/dummy/node_modules/@babel/runtime/helpers/esm/defaults.js
disco_app-0.18.2 test/dummy/node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.2.0 node_modules/@babel/runtime/helpers/esm/defaults.js
trusty-cms-5.0.7 node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.18 node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.17 node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.16 node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.15 node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.14 node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.13 node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.12 node_modules/@babel/runtime/helpers/esm/defaults.js
trusty-cms-5.0.6 node_modules/@babel/runtime/helpers/esm/defaults.js
trusty-cms-5.0.5 node_modules/@babel/runtime/helpers/esm/defaults.js
trusty-cms-5.0.4 node_modules/@babel/runtime/helpers/esm/defaults.js
disco_app-0.16.1 test/dummy/node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.11 node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.10 node_modules/@babel/runtime/helpers/esm/defaults.js
isomorfeus-redux-4.1.9 node_modules/@babel/runtime/helpers/esm/defaults.js
disco_app-0.15.2 test/dummy/node_modules/@babel/runtime/helpers/esm/defaults.js