You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
474 B
14 lines
474 B
'use strict'; |
|
var classof = require('../internals/classof'); |
|
var wellKnownSymbol = require('../internals/well-known-symbol'); |
|
|
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag'); |
|
var test = {}; |
|
|
|
test[TO_STRING_TAG] = 'z'; |
|
|
|
// `Object.prototype.toString` method implementation |
|
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring |
|
module.exports = String(test) !== '[object z]' ? function toString() { |
|
return '[object ' + classof(this) + ']'; |
|
} : test.toString;
|
|
|