_objectToString.js 565 B

1234567891011121314151617181920212223
  1. /** Used for built-in method references. */
  2. var objectProto = Object.prototype;
  3. /**
  4. * Used to resolve the
  5. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  6. * of values.
  7. */
  8. var nativeObjectToString = objectProto.toString;
  9. /**
  10. * Converts `value` to a string using `Object.prototype.toString`.
  11. *
  12. * @private
  13. * @param {*} value The value to convert.
  14. * @returns {string} Returns the converted string.
  15. */
  16. function objectToString(value) {
  17. return nativeObjectToString.call(value);
  18. }
  19. module.exports = objectToString;