object-to-string.js 371 B

123456789
  1. 'use strict';
  2. var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');
  3. var classof = require('../internals/classof');
  4. // `Object.prototype.toString` method implementation
  5. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  6. module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  7. return '[object ' + classof(this) + ']';
  8. };