node:console

#Import

import console from "nstdlib/node/console";

Note

Behaves like Node.js. The whole namespace is diffed in child realms, writes to process.stdout/stderr included. The five inspector names answer what the host answers with no debugger attached. profile, profileEnd, timeStamp and context accept and drop, and createTask runs its callback for real.

#Support

node:console. nstd: some support; Node test suite 77.3% passing. Browser: some support; export coverage 96.8%; Node test suite 86.4% passing.

  • nstd: 17/22 of Node's own eligible tests pass under nstd.
  • Browser: Loads with a minimal process object. 30 of Node's 31 exports are available. No behavior check covers it yet.

#Exports (31)

Every name Node.js exports from this module, and what you get when you read it, as a named import or as a property of the default import:

  • ✅ A value, both ways. An export that throws an error naming the missing feature also counts.
  • ⚠️ A value one way, undefined the other.
  • ❔ undefined both ways.
  • ❌ Not exported at all.
  • – Not measured.
ExportNode.jsBrowser
Console✅✅
_ignoreErrors✅✅
_stderr✅✅
_stderrErrorHandler✅✅
_stdout✅❌
_stdoutErrorHandler✅✅
_times✅✅
assert✅✅
clear✅✅
context✅✅
count✅✅
countReset✅✅
createTask✅✅
debug✅✅
dir✅✅
dirxml✅✅
error✅✅
group✅✅
groupCollapsed✅✅
groupEnd✅✅
info✅✅
log✅✅
profile✅✅
profileEnd✅✅
table✅✅
time✅✅
timeEnd✅✅
timeLog✅✅
timeStamp✅✅
trace✅✅
warn✅✅

#Diagnostics

nstdlib running inside Node.js. This isn't an environment it's meant for, so it isn't shown above, but it tells a library problem from an environment one:

  • coverage: 31/31 of the host's export names answer inside host node. Behaviour verified against the host builtin. The whole namespace is diffed in child realms, writes to process.stdout/stderr included. The five inspector names answer what the host answers with no debugger attached. profile, profileEnd, timeStamp and context accept and drop, and createTask runs its callback for real.
  • smoke: Imports in a clean child process.
  • node-suite: 18/22 of Node's own eligible tests pass with ./dist inside host node. A failure there and in the page is the library's, one only in the page is the engine's.