thisBooleanValue.js 332 B

12345678910111213
  1. 'use strict';
  2. var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf');
  3. // https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object
  4. module.exports = function thisBooleanValue(value) {
  5. if (typeof value === 'boolean') {
  6. return value;
  7. }
  8. return $BooleanValueOf(value);
  9. };