@contrast/code-events
v3.1.0
Published
Listen for v8 CodeEvents and make them available to JavaScript
Downloads
80,722
Maintainers
Keywords
Readme
@contrast/code-events
This module exposes CodeEvent data from the underlying v8 engine, such as the 'LAZY_COMPILE' and 'FUNCTION' types.
Usage
Register a listener for code events:
const { setCodeEventListener } = require('@contrast/code-events');
// with the default poll interval of 100ms:
setCodeEventListener((event) => {
console.log(event);
});
// with a custom poll interval of 500ms:
setCodeEventListener((event) => {
console.log(event);
}, { interval: 500 });