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
immosquare-cleaner-0.1.60 node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.59 node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.58 node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.57 node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.56 node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.55 node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.54 node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.53 node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.52 node_modules/lodash/_getRawTag.js
trusty-cms-6.3.1 node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.51 node_modules/lodash/_getRawTag.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/_getRawTag.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/_getRawTag.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/_getRawTag.js
immosquare-cleaner-0.1.50 node_modules/lodash/_getRawTag.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/_getRawTag.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/_getRawTag.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/_getRawTag.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/lodash/_getRawTag.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/lodash/_getRawTag.js