[READ-ONLY] Mirror of https://github.com/CanadaHonk/porffor. An ahead-of-time JavaScript compiler porffor.dev
Something went wrong. Try again.
TypeScript
123456789101112131415161718192021222324252627282930import type {} from './porffor.d.ts';
// 20.3.1.1 Boolean (value)// https://tc39.es/ecma262/#sec-boolean-constructor-boolean-valueexport const Boolean = function (value: any): boolean|any { // 1. Let b be ToBoolean(value). const b: boolean = !!value;
// 2. If NewTarget is undefined, return b. if (!new.target) return b;
return b as BooleanObject;};
// 20.3.3.2 Boolean.prototype.toString ()// https://tc39.es/ecma262/#sec-boolean.prototype.tostringexport const __Boolean_prototype_toString = function (this: boolean) { // 1. Let b be ? ThisBooleanValue(this value). // 2. If b is true, return "true"; else return "false". if (this) return 'true'; return 'false';};
// 20.3.3.3 Boolean.prototype.valueOf ()// https://tc39.es/ecma262/#sec-boolean.prototype.valueofexport const __Boolean_prototype_valueOf = function (this: boolean) { // 1. Return ? ThisBooleanValue(this value). return this;};