aswi2020vldc-gitlab/templetes/node_modules/es-abstract/2017/thisStringValue.js @ 0b434236
1 | 3a515b92 | cagy | '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 | };
|