npm i awdb_nodejs
Module is fully compatible with IPv6. There are no differences in API between IPv4 and IPv6.
const lookup = await aw.open('/path/to/****.awdb');
const location = lookup.get('2001:4860:0:1001::3004:ef68');
aw.open(filepath, [options])_
-
filepath
:<string>
Path to the binary awdb file. -
options
:<Object>
-
cache
:<Object>
Cache options. Under the bonnet module uses tiny-lru cache.-
max
:<number>
Max cache items to keep in memory. Default:6000
.
-
-
watchForUpdates
:<boolean>
Supports reloading the reader when changes occur to the database that is loaded. Default:false
. -
watchForUpdatesNonPersistent
:<boolean>
Controlls wether the watcher should be persistent or not. If it is persistent, a node process will be blocked in watching state if the watcher is the only thing still running in the program. Default:false
. -
watchForUpdatesHook
:<Function>
Hook function that is fired on database update. Default:null
.
-
MIT