es6.object.to-string.js 321 B

12345678910
  1. 'use strict';
  2. // 19.1.3.6 Object.prototype.toString()
  3. var classof = require('./_classof');
  4. var test = {};
  5. test[require('./_wks')('toStringTag')] = 'z';
  6. if (test + '' != '[object z]') {
  7. require('./_redefine')(Object.prototype, 'toString', function toString() {
  8. return '[object ' + classof(this) + ']';
  9. }, true);
  10. }