thisStringValue.js 326 B

12345678910111213
  1. 'use strict';
  2. var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf');
  3. // https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object
  4. module.exports = function thisStringValue(value) {
  5. if (typeof value === 'string') {
  6. return value;
  7. }
  8. return $StringValueOf(value);
  9. };