@mediocre/bloodhound
Advanced tools
Comparing version 0.4.1 to 0.5.0
@@ -5,2 +5,3 @@ const NodeGeocoder = require('node-geocoder'); | ||
const USPS = require('./carriers/usps'); | ||
const DHL = require('./carriers/dhl'); | ||
@@ -28,2 +29,3 @@ const geography = require('./util/geography'); | ||
const usps = new USPS(options && options.usps); | ||
const dhl = new DHL(options && options.dhl); | ||
@@ -35,2 +37,4 @@ this.guessCarrier = function(trackingNumber) { | ||
return 'USPS'; | ||
} else if (dhl.isTrackingNumberValid(trackingNumber)) { | ||
return 'DHL'; | ||
} else { | ||
@@ -70,2 +74,4 @@ return undefined; | ||
usps.track(trackingNumber, callback); | ||
} else if (carrier === 'dhl') { | ||
dhl.track(trackingNumber, callback); | ||
} else { | ||
@@ -72,0 +78,0 @@ return callback(new Error(`Carrier ${carrier} is not supported.`)); |
{ | ||
"description": "Bloodhound is a Node.js package that allows you to retrieve data from shipping carriers (DHL, FedEx, UPS, USPS) in a common format.", | ||
"description": "Bloodhound is a Node.js package that allows you to retrieve tracking data from shipping carriers (DHL, FedEx, UPS, USPS) in a common format.", | ||
"dependencies": { | ||
@@ -20,2 +20,3 @@ "async": "~3.1.0", | ||
"keywords": [ | ||
"dhl", | ||
"fedex", | ||
@@ -40,3 +41,3 @@ "logistics", | ||
}, | ||
"version": "0.4.1" | ||
"version": "0.5.0" | ||
} |
@@ -8,3 +8,3 @@ # Bloodhound | ||
Bloodhound is a Node.js package that allows you to retrieve data from shipping carriers (DHL, FedEx, UPS, USPS) in a common format. | ||
Bloodhound is a Node.js package that allows you to retrieve tracking data from shipping carriers (DHL, FedEx, UPS, USPS) in a common format. | ||
@@ -37,2 +37,3 @@ This module was inspired by the excellent `shipit` module. We built Bloodhound to provide better support for parsing of timestamps (read more below). | ||
## Supported Carriers | ||
- DHL | ||
- FedEx | ||
@@ -39,0 +40,0 @@ - USPS |
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
48777
10
650
160