UNPKG

474 BJavaScriptView Raw
1'use strict';
2var classof = require('../internals/classof');
3var wellKnownSymbol = require('../internals/well-known-symbol');
4
5var TO_STRING_TAG = wellKnownSymbol('toStringTag');
6var test = {};
7
8test[TO_STRING_TAG] = 'z';
9
10// `Object.prototype.toString` method implementation
11// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
12module.exports = String(test) !== '[object z]' ? function toString() {
13 return '[object ' + classof(this) + ']';
14} : test.toString;