| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 1 | 'use strict'; |
| 2 | |||||
| 3 | var $BooleanValueOf = require('call-bind/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 | }; | ||||