ThisStringValue.js 327 B

12345678910111213
  1. 'use strict';
  2. var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf');
  3. // https://262.ecma-international.org/15.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. };