@hebcal/geo-sqlite 5.7.3 → 5.7.4
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.
- package/dist/index.js +7 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/geo-sqlite v5.7.
|
|
1
|
+
/*! @hebcal/geo-sqlite v5.7.4 */
|
|
2
2
|
import Database from 'better-sqlite3';
|
|
3
3
|
import QuickLRU from 'quick-lru';
|
|
4
4
|
import { Location, Locale } from '@hebcal/core';
|
|
@@ -511,7 +511,7 @@ function munge(s) {
|
|
|
511
511
|
}
|
|
512
512
|
|
|
513
513
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
514
|
-
const version = '5.7.
|
|
514
|
+
const version = '5.7.4';
|
|
515
515
|
|
|
516
516
|
const GEONAME_SQL = `SELECT
|
|
517
517
|
g.name as name,
|
|
@@ -769,10 +769,10 @@ class GeoDb {
|
|
|
769
769
|
if (countryName === 'United States') countryName = 'USA';
|
|
770
770
|
if (countryName === 'United Kingdom') countryName = 'UK';
|
|
771
771
|
let cityDescr = cityName;
|
|
772
|
-
if (countryName !== 'Israel' && admin1 && admin1.
|
|
772
|
+
if (countryName !== 'Israel' && admin1 && !admin1.includes(cityName)) {
|
|
773
773
|
const tlitCityName = transliterate(cityName);
|
|
774
774
|
const tlitAdmin1 = transliterate(admin1);
|
|
775
|
-
if (tlitAdmin1.
|
|
775
|
+
if (!tlitAdmin1.includes(tlitCityName)) {
|
|
776
776
|
cityDescr += ', ' + admin1;
|
|
777
777
|
}
|
|
778
778
|
}
|
|
@@ -796,7 +796,7 @@ class GeoDb {
|
|
|
796
796
|
const location = new Location(
|
|
797
797
|
result.latitude,
|
|
798
798
|
result.longitude,
|
|
799
|
-
result.cc
|
|
799
|
+
result.cc === 'IL',
|
|
800
800
|
result.timezone,
|
|
801
801
|
cityDescr,
|
|
802
802
|
result.cc,
|
|
@@ -809,7 +809,7 @@ class GeoDb {
|
|
|
809
809
|
if (admin1) {
|
|
810
810
|
location.admin1 = admin1;
|
|
811
811
|
}
|
|
812
|
-
if (result.cc
|
|
812
|
+
if (result.cc === 'IL' && admin1.startsWith('Jerusalem') && result.name.startsWith('Jerualem')) {
|
|
813
813
|
location.jersualem = true;
|
|
814
814
|
}
|
|
815
815
|
if (result.population) {
|
|
@@ -934,7 +934,7 @@ class GeoDb {
|
|
|
934
934
|
const admin1 = res.admin || loc.admin1 || '';
|
|
935
935
|
const obj = {
|
|
936
936
|
id: res.geonameid,
|
|
937
|
-
value:
|
|
937
|
+
value: loc.getName(),
|
|
938
938
|
admin1,
|
|
939
939
|
country,
|
|
940
940
|
cc,
|