UNPKG

425 BJavaScriptView Raw
1var defineProperty = require('../internals/object-define-property').f;
2var has = require('../internals/has');
3var wellKnownSymbol = require('../internals/well-known-symbol');
4
5var TO_STRING_TAG = wellKnownSymbol('toStringTag');
6
7module.exports = function (it, TAG, STATIC) {
8 if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
9 defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
10 }
11};