A simple debug function that will print messages to the console if the
DEBUG environment variable is set to * or contains the word FHIR.
If the NODE_ENV environment variable is set to test, this function
becomes a no-op.
In browser environments, this function always prints the messages but using
console.debug instead of console.log. This means that in browsers
that support it (most modern browsers) the messages will be hidden by
default and can be enabled from the dev tools.
A simple debug function that will print messages to the console if the
DEBUGenvironment variable is set to*or contains the wordFHIR. If theNODE_ENVenvironment variable is set totest, this function becomes a no-op. In browser environments, this function always prints the messages but usingconsole.debuginstead ofconsole.log. This means that in browsers that support it (most modern browsers) the messages will be hidden by default and can be enabled from the dev tools.