Sha256: 3142fd97f89816f65a1b5bd17931f70c12fd9714d455c28cac4b91491901c713

Contents?: true

Size: 1.11 KB

Versions: 273

Compression:

Stored size: 1.11 KB

Contents

var Symbol = require('./_Symbol');

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag),
      tag = value[symToStringTag];

  try {
    value[symToStringTag] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag] = tag;
    } else {
      delete value[symToStringTag];
    }
  }
  return result;
}

module.exports = getRawTag;

Version data entries

273 entries across 271 versions & 29 rubygems

Version Path
disco_app-0.18.2 test/dummy/node_modules/lodash/_getRawTag.js
sumomo-0.8.15 data/sumomo/api_modules/node_modules/lodash/_getRawTag.js
trusty-cms-5.0.7 node_modules/lodash/_getRawTag.js
appmap-0.72.2 ./node_modules/lodash/_getRawTag.js
trusty-cms-5.0.6 node_modules/lodash/_getRawTag.js
appmap-0.72.1 ./node_modules/lodash/_getRawTag.js
appmap-0.72.0 ./node_modules/lodash/_getRawTag.js
trusty-cms-5.0.5 node_modules/lodash/_getRawTag.js
trusty-cms-5.0.4 node_modules/lodash/_getRawTag.js
appmap-0.71.0 ./node_modules/lodash/_getRawTag.js
disco_app-0.16.1 test/dummy/node_modules/lodash/_getRawTag.js
appmap-0.70.2 ./node_modules/lodash/_getRawTag.js
sumomo-0.8.14 data/sumomo/api_modules/node_modules/lodash/_getRawTag.js
appmap-0.70.1 ./node_modules/lodash/_getRawTag.js
appmap-0.70.0 ./node_modules/lodash/_getRawTag.js
appmap-0.69.0 ./node_modules/lodash/_getRawTag.js
sumomo-0.8.13 data/sumomo/api_modules/node_modules/lodash/_getRawTag.js
appmap-0.68.2 ./node_modules/lodash/_getRawTag.js
appmap-0.68.1 ./node_modules/lodash/_getRawTag.js
disco_app-0.15.2 test/dummy/node_modules/lodash/_getRawTag.js