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-17.12.1 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.12.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.11.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.10.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.9.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.8.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.7.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.6.1 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.6.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.5.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.4.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.3.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.2.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.1.1 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.1.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-17.0.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.29.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.28.0 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.27.1 node_modules/lodash/_safeGet.js
govuk_publishing_components-16.27.0 node_modules/lodash/_safeGet.js