@omnicar/sam-zip-city
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -79,28 +79,27 @@ import { __awaiter, __generator } from "tslib"; | ||
case 1: | ||
if (!(_i < searchDataLocations_1.length)) return [3 /*break*/, 9]; | ||
if (!(_i < searchDataLocations_1.length)) return [3 /*break*/, 6]; | ||
path = searchDataLocations_1[_i]; | ||
_a.label = 2; | ||
case 2: | ||
_a.trys.push([2, 7, , 8]); | ||
if (!isFetchJsonLocally) return [3 /*break*/, 4]; | ||
return [4 /*yield*/, import('./countries/' + country + '.json')]; | ||
_a.trys.push([2, 4, , 5]); | ||
return [4 /*yield*/, loadFile(path + country.toLowerCase() + '.json') | ||
// } | ||
]; | ||
case 3: | ||
// if (isFetchJsonLocally) { | ||
// response = await import('./countries/' + country + '.json') | ||
// } else { | ||
response = _a.sent(); | ||
return [3 /*break*/, 6]; | ||
case 4: return [4 /*yield*/, loadFile(path + country.toLowerCase() + '.json')]; | ||
case 5: | ||
response = _a.sent(); | ||
_a.label = 6; | ||
case 6: | ||
// } | ||
zipcodeMap = response.zipcodeMap; | ||
return [2 /*return*/, zipcodeMap]; | ||
case 7: | ||
case 4: | ||
err_1 = _a.sent(); | ||
console.warn('Warning: Failed importing zip-codes for isoCountry: ' + country + ', from: ' + path + ', ' + (err_1 === null || err_1 === void 0 ? void 0 : err_1.message)); | ||
response = false; | ||
return [3 /*break*/, 8]; | ||
case 8: | ||
return [3 /*break*/, 5]; | ||
case 5: | ||
_i++; | ||
return [3 /*break*/, 1]; | ||
case 9: return [2 /*return*/, false]; | ||
case 6: return [2 /*return*/, false]; | ||
} | ||
@@ -107,0 +106,0 @@ }); |
{ | ||
"name": "@omnicar/sam-zip-city", | ||
"description": "A simple tool for looking up city names based on zipcode inputs.", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "typings": "dist/index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9678
151