mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
Copy docs into Zeek repo directly
This is based on commit 2731def9159247e6da8a3191783c89683363689c from the zeek-docs repo.
This commit is contained in:
parent
83f1e74643
commit
ded98cd373
1074 changed files with 169319 additions and 0 deletions
13
doc/scripting/js/zeek-as.js
Normal file
13
doc/scripting/js/zeek-as.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
// zeek-as.js
|
||||
zeek.on('zeek_init', () => {
|
||||
try {
|
||||
// This throws because type_name takes an any parameter
|
||||
zeek.invoke('type_name', ['192.168.0.0/16']);
|
||||
} catch (e) {
|
||||
console.error(`error: ${e}`);
|
||||
}
|
||||
|
||||
// Explicit conversion of string to addr type.
|
||||
let type_string = zeek.invoke('type_name', [zeek.as('subnet', '192.168.0.0/16')]);
|
||||
console.log(`good: type_name is ${type_string}`);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue