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