thezipcodes
Advanced tools
Comparing version 1.0.3 to 1.0.4
const theZipCodes = require("thezipcodes"); | ||
theZipCodesApi = new theZipCodes("1c1442cb2ac7fdddfca504d5345e9231"); | ||
theZipCodesApi = new theZipCodes("apiKey"); | ||
// Get Zip code to Location | ||
@@ -32,3 +32,4 @@ theZipCodesApi | ||
"13041", // toZipCode | ||
"US" // countryCode | ||
"US", // countryCode, | ||
"KM" // unit | ||
) | ||
@@ -35,0 +36,0 @@ .then((data) => { |
@@ -44,3 +44,3 @@ const request = require("request"); | ||
} | ||
getDistance(fromZipCode, toZipCode, countryCode) { | ||
getDistance(fromZipCode, toZipCode, countryCode, unit) { | ||
const params = { | ||
@@ -50,2 +50,3 @@ fromZipCode: fromZipCode, | ||
countryCode: countryCode, | ||
unit: unit | ||
}; | ||
@@ -52,0 +53,0 @@ const url = distanceUrl; |
{ | ||
"name": "thezipcodes", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4577
89