How to use the @maxmind/geoip2-node.Reader.open function in @maxmind/geoip2-node

To help you get started, we’ve selected a few @maxmind/geoip2-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maxmind / GeoIP2-node / e2e / ts / index.spec.ts View on Github external
it('exists', async () => {
    expect.assertions(1);
    const response = await Reader.open('../GeoIP2-City-Test.mmdb');
    expect(response.city('175.16.199.1')).toHaveProperty('city.geonameId');
  });
});
github maxmind / GeoIP2-node / e2e / js / index.spec.js View on Github external
it('exists', async () => {
    expect.assertions(1);
    const response = await Reader.open('../GeoIP2-City-Test.mmdb');
    expect(response.city('175.16.199.1')).toHaveProperty('city.geonameId');
  });
});

@maxmind/geoip2-node

Node.js API for GeoIP2 webservice client and database reader

Apache-2.0
Latest version published 11 months ago

Package Health Score

77 / 100
Full package analysis