Skip to content

Commit 57264de

Browse files
committed
Fix field order inconsistency between IPv4 and IPv6 responses
- Standardize object property order for both IPv4 and IPv6 lookups - Order is now consistent: range, country, region, eu, timezone, city, ll, metro, area - Previously IPv6 had different order: range, country, region, city, ll, metro, area, eu, timezone - All tests passing
1 parent 828e891 commit 57264de

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

dist/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/main.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,17 @@ const lookup6 = ip => {
173173
const locBuffer = cache4.locationBuffer;
174174
const locRecordSize = cache4.locationRecordSize;
175175

176-
const geoData = { range: [null, null], country: '', region: '', city: '', ll: [0, 0], metro: null, area: null, eu: '', timezone: '' };
176+
const geoData = {
177+
range: [null, null],
178+
country: '',
179+
region: '',
180+
eu: '',
181+
timezone: '',
182+
city: '',
183+
ll: [null, null],
184+
metro: null,
185+
area: null,
186+
};
177187

178188
let fline = 0;
179189
let cline = cache6.lastLine;

0 commit comments

Comments
 (0)