frenchbread / private-ip

Check if IP address is private.
MIT License
33 stars 16 forks source link

Exported default function types not correct #18

Open vasco-santos opened 2 years ago

vasco-santos commented 2 years ago

This module exports the default as not a function, which results on projects trying to compile typescript using this module as

Type 'typeof import("/home/trout/tmp/js-libp2p/node_modules/private-ip/lib/index")' has no call signatures.

Ref https://github.com/libp2p/js-libp2p/issues/1019

frenchbread commented 2 years ago

Hey @vasco-santos thanks for reporting this.

I've opened a PR #19. Could you please check if it fixes the issue.