@mikro-orm/core
Version:
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.
12 lines (11 loc) • 325 B
JavaScript
let nodeInspect;
/** @internal */
export function inspect(value, options) {
nodeInspect ??= globalThis.process?.getBuiltinModule?.('node:util').inspect;
/* v8 ignore else */
if (nodeInspect) {
return nodeInspect(value, options);
}
/* v8 ignore next */
return JSON.stringify(value, null, 2);
}