diff --git a/package-lock.json b/package-lock.json index a0e7ceeb..2edacae7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,6 +56,7 @@ "@mapeo/mock-data": "^1.0.1", "@sinonjs/fake-timers": "^10.0.2", "@types/b4a": "^1.6.0", + "@types/bogon": "^1.0.2", "@types/debug": "^4.1.8", "@types/json-schema": "^7.0.11", "@types/nanobench": "^3.0.0", @@ -911,6 +912,12 @@ "@types/node": "*" } }, + "node_modules/@types/bogon": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/bogon/-/bogon-1.0.2.tgz", + "integrity": "sha512-R7YtCuBSS16AfLJttU/WxFzEC/rlPxUrdfyHkE/VcIybpC1nXftIg1eaFWx0PpV1ZBF/COjTgwRXprUsNew0ng==", + "dev": true + }, "node_modules/@types/debug": { "version": "4.1.8", "dev": true, diff --git a/package.json b/package.json index 760626b0..18d1f338 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "@mapeo/mock-data": "^1.0.1", "@sinonjs/fake-timers": "^10.0.2", "@types/b4a": "^1.6.0", + "@types/bogon": "^1.0.2", "@types/debug": "^4.1.8", "@types/json-schema": "^7.0.11", "@types/nanobench": "^3.0.0", diff --git a/types/bogon.d.ts b/types/bogon.d.ts deleted file mode 100644 index 551ed734..00000000 --- a/types/bogon.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare module 'bogon' { - /** - * Check if an IP is a bogon. - * - * @param ip - The IP address to check. - * @returns `true` if the IP is a bogon, `false` otherwise. - */ - function bogon(ip: string): boolean - - namespace bogon { - /** - * Check if a bogon IP address is a private IP address on a local network. - * - * @param ip - The IP address to check. - * @returns `true` if the IP is a private IP address, `false` otherwise. - */ - function isPrivate(ip: string): boolean - const isBogon = bogon - } - - export = bogon -}