UNPKG

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