# awdb_nodejs

> IP lookup using aiwen databases

Latest version **1.0.1** (published 2020-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install awdb_nodejs
pnpm add awdb_nodejs
yarn add awdb_nodejs
bun add awdb_nodejs
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-05-06 |
| First published | 2020-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=11 |
| Dependencies | 1 |
| Unpacked size | 50.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dwyer |
| Maintainers | dwyer |
| Keywords | awdb |

## Links

- npm: https://www.npmjs.com/package/awdb_nodejs
- Repository: https://github.com/ipplus360
- npm.io page: https://npm.io/package/awdb_nodejs

## Dependencies (1)

- [tiny-lru](https://npm.io/package/tiny-lru.md) 7.0.2

## Recent versions

- 1.0.1 (latest) — 2020-05-06
- 1.0.0 — 2020-05-04

## README

## Installation

```shell
npm i awdb_nodejs
```

## V6 Support

Module is fully compatible with IPv6. There are no differences in API between IPv4 and IPv6.

```javascript
const lookup = await aw.open('/path/to/****.awdb');
const location = lookup.get('2001:4860:0:1001::3004:ef68');
```

## Options

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](https://github.com/avoidwork/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`.

## License

MIT

---
_Source: https://npm.io/package/awdb_nodejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
