1.0.1 • Published 4 years ago

@offirmo/universal-debug-api-placeholder v1.0.1

Weekly downloads
10
License
Unlicense
Repository
github
Last release
4 years ago

This is a minimal, no-operation implementation of Offirmo’s Universal Debug API.

Isomorphic, for node and browser.

Does nothing, minimal code footprint. BUT will transparently yield to any other previously required/imported effective version such as node or browser. Pro tip: for browser, hot-swap this placeholder at run time with the companion webextension!

See overall explanation: Offirmo’s Universal Debug API.

Usage

Use this lib to not bloat your module or webapp/lambda/npx bundle. This no-op implementation will do nothing = display nothing = compute nothing.

However, when an effective implementation is used (see above), this module will silently and automatically forward the effective implementation instead of its own no-op mock.

import {
	getLogger,
	exposeInternal,
	overrideHook,
	addDebugCommand,
	globalThis, // exposed from sub-dependency for convenience
} from '@offirmo/universal-debug-api-placeholder'