You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

thisStringValue.js 362B

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