mmdb-lib 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/decoder.js +1 -1
  2. package/package.json +5 -3
package/lib/decoder.js CHANGED
@@ -236,7 +236,7 @@ class Decoder {
236
236
  return 0;
237
237
  }
238
238
  decodeString(offset, size) {
239
- return this.db.toString('utf8', offset, offset + size);
239
+ return this.db.slice(offset, offset + size).toString();
240
240
  }
241
241
  decodeBigUint(offset, size) {
242
242
  const buffer = Buffer.alloc(size);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mmdb-lib",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "homepage": "https://github.com/runk/mmdb-lib",
5
5
  "description": "Maxmind DB (MMDB) Library",
6
6
  "keywords": [
@@ -12,7 +12,8 @@
12
12
  ],
13
13
  "author": "Dmitry Shirokov <deadrunk@gmail.com>",
14
14
  "contributors": [
15
- "William Storey @horgh"
15
+ "William Storey @horgh",
16
+ "Uman Shahzad @UmanShahzad"
16
17
  ],
17
18
  "devDependencies": {
18
19
  "@types/ip-address": "5.8.2",
@@ -28,6 +29,7 @@
28
29
  "semantic-release": "^18.0.1",
29
30
  "sinon": "9.0.1",
30
31
  "ts-jest": "^27.1.2",
32
+ "ts-node": "^10.4.0",
31
33
  "typescript": "4.5.4"
32
34
  },
33
35
  "repository": {
@@ -53,7 +55,7 @@
53
55
  "lint": "eslint . --ext .ts",
54
56
  "lint:types": "tsc --noEmit",
55
57
  "test": "jest",
56
- "test-imports": "node test/imports/commonjs.js && node test/imports/esm.mjs",
58
+ "test-imports": "node test/imports/commonjs.js && node test/imports/esm.mjs && ts-node test/imports/typescript.ts",
57
59
  "format": "prettier --write src",
58
60
  "prepublish": "npm run build",
59
61
  "semantic-release": "semantic-release"