Sha256: f14484995fc8897da35707c5ad457cd1155a89f6fcc50628d9e045f9d098f7af

Contents?: true

Size: 354 Bytes

Versions: 38

Compression:

Stored size: 354 Bytes

Contents

/**
 * Gets the value at `key`, unless `key` is "__proto__".
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function safeGet(object, key) {
  if (key == '__proto__') {
    return;
  }

  return object[key];
}

module.exports = safeGet;

Version data entries

38 entries across 38 versions & 4 rubygems

Version Path
govuk_publishing_components-16.26.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.25.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.24.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.23.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.22.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.21.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.20.1 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.20.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.19.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.18.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.17.0 node_modules/lodash/_safeGet.js
blsk-sevcore-0.0.2 blsk_old/bluesky-doc/bluesky-doc/node_modules/lodash/_safeGet.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/lodash/_safeGet.js
lux_assets-0.2.11 ./node_modules/lodash/_safeGet.js
lux_assets-0.2.9 ./node_modules/lodash/_safeGet.js
lux_assets-0.2.4 ./node_modules/lodash/_safeGet.js
lux_assets-0.2.2 ./node_modules/lodash/_safeGet.js
lux_assets-0.2.1 ./node_modules/lodash/_safeGet.js