New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

maxmind

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maxmind - npm Package Compare versions

Comparing version 3.0.5 to 3.1.0

20

package.json
{
"name": "maxmind",
"version": "3.0.5",
"version": "3.1.0",
"homepage": "https://github.com/runk/node-maxmind",

@@ -29,13 +29,13 @@ "description": "IP lookup using Maxmind databases",

"devDependencies": {
"@types/sinon": "7.0.11",
"@types/ip-address": "5.8.2",
"@types/jest": "24.0.13",
"@types/node": "10.14.6",
"github-publish-release": "5.0.1",
"ip-address": "5.8.9",
"@types/jest": "24.0.15",
"@types/node": "10.14.12",
"@types/sinon": "7.0.13",
"ip-address": "5.9.2",
"jest": "24.8.0",
"sinon": "7.3.2",
"ts-jest": "24.0.2",
"tslint": "5.16.0",
"typescript": "3.4.5"
"tslint": "5.18.0",
"typescript": "3.4.5",
"semantic-release": "^15.13.18"
},

@@ -64,5 +64,5 @@ "repository": {

"lint:types": "tsc --noEmit",
"release": "scripts/release",
"test": "jest"
"test": "jest",
"semantic-release": "semantic-release"
}
}

@@ -39,8 +39,13 @@ # node-maxmind [![Build Status](https://api.travis-ci.org/runk/node-maxmind.svg?branch=master)](https://travis-ci.org/runk/node-maxmind)

console.log(lookup.get('66.6.44.4')); // inferred type maxmind.CityResponse
```
// Use Reader class directly
### Sync API
You can use `Reader` class directly, if you would want to instantiate it in non-async fashion. Use cases would include receiving a buffer database over network, or just reading it synchronously from disk.
```typescript
import { Reader } from 'maxmind';
const buffer = await downloadFromCloudToStream();
const buffer = fs.readFileSync('./db.mmdb');
const lookup = new Reader<CityResponse>(buffer);
let city = lookup.get('8.8.8.8'); // inferred type maxmind.CityResponse
const city = lookup.get('8.8.8.8');
```

@@ -47,0 +52,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc