mirror of
https://github.com/nodejs/node.git
synced 2025-05-21 17:44:15 +00:00

Expose the internal `primordials` object to help with Node.js core development. ```console $ node --expose-internals -r internal/test/binding lib/fs.js (node:5299) internal/test/binding: These APIs are for internal testing only. Do not use them. (Use `node --trace-warnings ...` to show where the warning was created) ``` PR-URL: https://github.com/nodejs/node/pull/36872 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
13 lines
298 B
JavaScript
13 lines
298 B
JavaScript
'use strict';
|
|
|
|
process.emitWarning(
|
|
'These APIs are for internal testing only. Do not use them.',
|
|
'internal/test/binding');
|
|
|
|
if (module.isPreloading) {
|
|
globalThis.internalBinding = internalBinding;
|
|
globalThis.primordials = primordials;
|
|
}
|
|
|
|
module.exports = { internalBinding, primordials };
|