blob: 8e4274d811844ebbe444a294daa78bd4d3952ebe [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001'use strict';
2
3var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf');
4
5var Type = require('./Type');
6
7// https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object
8
9module.exports = function thisStringValue(value) {
10 if (Type(value) === 'String') {
11 return value;
12 }
13
14 return $StringValueOf(value);
15};