blob: 62e4386baae23956a4bfaca2e36c1f7281d94086 [file] [log] [blame]
Tim van der Lippefdbd42e2020-04-07 14:14:361'use strict';
2
Tim van der Lippe2c891972021-07-29 15:22:503var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf');
Tim van der Lippefdbd42e2020-04-07 14:14:364
Nikolay Vitkovd76576c2024-12-02 14:10:155// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object
Tim van der Lippefdbd42e2020-04-07 14:14:366
7module.exports = function thisStringValue(value) {
Nikolay Vitkovd76576c2024-12-02 14:10:158 if (typeof value === 'string') {
Tim van der Lippefdbd42e2020-04-07 14:14:369 return value;
10 }
11
12 return $StringValueOf(value);
13};