auto-detection-carriers
Advanced tools
Comparing version 0.9.1 to 0.9.2
@@ -27,2 +27,4 @@ module.exports = { | ||
matchAmazonLogistics = /^[0-9]{1}LS[0-9]{12}$/; | ||
if (matchUPS1.exec(trackingNumber) || | ||
@@ -51,2 +53,4 @@ matchUPS2.exec(trackingNumber)) { | ||
return 'lasership'; | ||
} else if (matchAmazonLogistics.exec(trackingNumber)) { | ||
return 'amazon logistic'; | ||
} | ||
@@ -53,0 +57,0 @@ return ''; |
{ | ||
"name": "auto-detection-carriers", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Auto-detection carriers", | ||
@@ -5,0 +5,0 @@ "main": "carriers.js", |
@@ -9,4 +9,12 @@ # auto-detection-carriers | ||
npm install auto-detection-carriers | ||
yarn add auto-detection-carriers | ||
``` | ||
## Test | ||
```bash | ||
npm run test | ||
yarn test | ||
``` | ||
## Example | ||
@@ -16,3 +24,6 @@ | ||
var lib = require('auto-detection-carriers'), | ||
lib.getCarrier('1ZE307F90300947572'); | ||
lib.getCarrier('1ZE307F90300947572'); // ups | ||
lib.getCarrier('449044304137821'); // fedex | ||
lib.getCarrier('7070000000'); // dhl | ||
lib.getCarrier('TBA000000000000'); // amazon logistic | ||
``` | ||
@@ -19,0 +30,0 @@ |
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
5318
6
63
37