Lines Matching defs:const

6 const {
42 const { trace } = internalBinding('trace_events');
43 const {
51 const {
56 const { previewEntries } = internalBinding('util');
57 const { Buffer: { isBuffer } } = require('buffer');
58 const {
62 const {
65 const {
71 const kCounts = Symbol('counts');
73 const kTraceConsoleCategory = 'node,node.console';
75 const kSecond = 1000;
76 const kMinute = 60 * kSecond;
77 const kHour = 60 * kMinute;
78 const kMaxGroupIndentation = 1000;
90 const kGroupIndent = Symbol('kGroupIndent');
91 const kGroupIndentationWidth = Symbol('kGroupIndentWidth');
92 const kFormatForStderr = Symbol('kFormatForStderr');
93 const kFormatForStdout = Symbol('kFormatForStdout');
94 const kGetInspectOptions = Symbol('kGetInspectOptions');
95 const kColorMode = Symbol('kColorMode');
96 const kIsConsole = Symbol('kIsConsole');
97 const kWriteToConsole = Symbol('kWriteToConsole');
98 const kBindProperties = Symbol('kBindProperties');
99 const kBindStreamsEager = Symbol('kBindStreamsEager');
100 const kBindStreamsLazy = Symbol('kBindStreamsLazy');
101 const kUseStdout = Symbol('kUseStdout');
102 const kUseStderr = Symbol('kUseStderr');
104 const optionsMap = new SafeWeakMap();
121 const {
172 const consolePropAttributes = {
186 const kColorInspectOptions = { colors: true };
187 const kNoColorInspectOptions = {};
278 const ignoreErrors = this._ignoreErrors;
279 const groupIndent = this[kGroupIndent];
281 const useStdout = streamSymbol === kUseStdout;
282 const stream = useStdout ? this._stdout : this._stderr;
283 const errorHandler = useStdout ?
326 const options = optionsMap.get(this);
341 const opts = this[kGetInspectOptions](this._stdout);
350 const opts = this[kGetInspectOptions](this._stderr);
363 const stream = streamSymbol === kUseStdout ?
378 const consoleMethods = {
411 const found = timeLogImpl(this, 'timeEnd', label);
426 const err = {
449 const {
463 const counts = this[kCounts];
476 const counts = this[kCounts];
510 const final = (k, v) => this.log(cliTable(k, v));
512 const _inspect = (v) => {
513 const depth = v !== null &&
517 const opt = {
525 const getIndexArray = (length) => ArrayFrom(
528 const mapIter = isMapIterator(tabularData);
532 const res = previewEntries(tabularData, true);
538 const keys = [];
539 const values = [];
548 for (const { 0: k, 1: v } of tabularData) {
563 const setIter = isSetIterator(tabularData);
567 const setlike = setIter || mapIter || isSet(tabularData);
569 const values = [];
571 for (const v of tabularData) {
578 const map = ObjectCreate(null);
580 const valuesKeyArray = [];
581 const indexKeyArray = ObjectKeys(tabularData);
584 const item = tabularData[indexKeyArray[i]];
585 const primitive = item === null ||
591 const keys = properties || ObjectKeys(item);
592 for (const key of keys) {
603 const keys = ObjectKeys(map);
604 const values = ObjectValues(map);
618 const time = self._times.get(label);
623 const duration = process.hrtime(time);
624 const ms = duration[0] * 1000 + duration[1] / 1e6;
626 const formatted = formatTime(ms);
662 const res = hours !== 0 ? `${hours}:${pad(minutes)}` : minutes;
673 const keyKey = 'Key';
674 const valuesKey = 'Values';
675 const indexKey = '(index)';
676 const iterKey = '(iteration index)';
678 const isArray = (v) => ArrayIsArray(v) || isTypedArray(v) || isBuffer(v);
682 for (const method of ReflectOwnKeys(consoleMethods))
695 const {
705 const { console: consoleFromVM } = internalBinding('inspector');
706 const nodeConsoleKeys = ObjectKeys(Console.prototype);
707 const vmConsoleKeys = ObjectKeys(consoleFromVM);
708 const originalKeys = new SafeSet(vmConsoleKeys.concat(nodeConsoleKeys));
709 const inspectorConsoleKeys = new SafeSet();
710 for (const key of ObjectKeys(globalConsole)) {
718 for (const key of inspectorConsoleKeys) {