%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; // See https://console.spec.whatwg.org/#console-namespace // > For historical web-compatibility reasons, the namespace object // > for console must have as its [[Prototype]] an empty object, // > created as if by ObjectCreate(%ObjectPrototype%), // > instead of %ObjectPrototype%. // Since in Node.js, the Console constructor has been exposed through // require('console'), we need to keep the Console constructor but // we cannot actually use `new Console` to construct the global console. // Therefore, the console.Console.prototype is not // in the global console prototype chain anymore. const { FunctionPrototypeBind, ObjectCreate, ReflectDefineProperty, ReflectGetOwnPropertyDescriptor, ReflectOwnKeys, } = primordials; const { Console } = require('internal/console/constructor'); const globalConsole = ObjectCreate({}); // Since Console is not on the prototype chain of the global console, // the symbol properties on Console.prototype have to be looked up from // the global console itself. In addition, we need to make the global // console a namespace by binding the console methods directly onto // the global console with the receiver fixed. for (const prop of ReflectOwnKeys(Console.prototype)) { if (prop === 'constructor') { continue; } const desc = ReflectGetOwnPropertyDescriptor(Console.prototype, prop); if (typeof desc.value === 'function') { // fix the receiver const name = desc.value.name; desc.value = FunctionPrototypeBind(desc.value, globalConsole); ReflectDefineProperty(desc.value, 'name', { __proto__: null, value: name }); } ReflectDefineProperty(globalConsole, prop, desc); } // This is a legacy feature - the Console constructor is exposed on // the global console instance. globalConsole.Console = Console; module.exports = globalConsole;