corelight / zeekjs

ZeekJS - Experimental JavaScript support for Zeek.
BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

js: Introduce a zeekjs linked binding #25

Closed awelzel closed 2 years ago

awelzel commented 2 years ago

Keep the global zeek object for now, but only make it global during script startup in ZeekJS::main_script_source. Technically can now hide it away and grab it when needed via:

const zeek = process._linkedBinding('zeekjs').zeek;
zeek.on('zeek_init', () => console.log('yes');

Not quite sure where this is going...