aswi2020vldc-gitlab/templetes/node_modules/es-abstract/2019/thisStringValue.js @ 56f6c6df
1 |
'use strict'; |
---|---|
2 |
|
3 |
var $StringValueOf = require('../helpers/callBound')('String.prototype.valueOf'); |
4 |
|
5 |
var Type = require('./Type'); |
6 |
|
7 |
// https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object
|
8 |
|
9 |
module.exports = function thisStringValue(value) { |
10 |
if (Type(value) === 'String') { |
11 |
return value; |
12 |
}
|
13 |
|
14 |
return $StringValueOf(value); |
15 |
};
|