Socket
Socket
Sign inDemoInstall

delivery-tracker

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delivery-tracker - npm Package Compare versions

Comparing version 0.8.5 to 0.9.0

lib/courier/usps.js

2

bin/index.js

@@ -8,3 +8,3 @@ #! /usr/bin/env node

.arguments('<tracecode>')
.option('-c, --courier <courier>', 'Courier Namespace', /^(KOREAPOST|ECARGO|FEDEX|PANTOS|RINCOS|AUSPOST|ROYALMAIL)$/i)
.option('-c, --courier <courier>', 'Courier Namespace', /^(KOREAPOST|ECARGO|FEDEX|PANTOS|RINCOS|AUSPOST|ROYALMAIL|USPS)$/i)
.action(function (tracecode) {

@@ -11,0 +11,0 @@ if (!tracker.COURIER[program.courier]) {

@@ -0,1 +1,4 @@

# 0.9.0
* added USPS.
# 0.8.5

@@ -2,0 +5,0 @@ * fixed timeout pantos.

@@ -58,3 +58,5 @@ 'use strict'

if (['1023369', '1005928', '1122926', '2208358'].indexOf(carrCd) !== -1) {
if (linkedAddr.indexOf('usps.com') !== -1) {
externalCourier = tracker.COURIER.USPS
} else if (['1023369', '1005928', '1122926', '2208358'].indexOf(carrCd) !== -1) {
externalCourier = tracker.COURIER.KOREAPOST

@@ -79,4 +81,3 @@ } else if (trkrSvcCd === 'E' && podNatnCd === 'KR') {

if (refBlNo.length === 22) {
// @TODO
externalCourier = 'USPS'
externalCourier = tracker.COURIER.USPS
} else if (linkedAddr.indexOf('fedex.com') !== -1) {

@@ -227,3 +228,3 @@ externalCourier = tracker.COURIER.FEDEX

result.checkpoints.sort(function (a, b) {
return (+new Date(b.time ? b.estimateTime : b.time)) - (+new Date(a.time ? a.estimateTime : a.time))
return (+new Date(b.courier.code === tracker.COURIER.PANTOS.CODE && b.time ? b.estimateTime : b.time)) - (+new Date(a.courier.code === tracker.COURIER.PANTOS.CODE && a.time ? a.estimateTime : a.time))
})

@@ -230,0 +231,0 @@ } else {

@@ -36,2 +36,6 @@ 'use strict'

NAME: 'Royal Mail'
},
USPS: {
CODE: 'usps',
NAME: 'USPS'
}

@@ -38,0 +42,0 @@ }

{
"name": "delivery-tracker",
"version": "0.8.5",
"version": "0.9.0",
"author": {

@@ -27,2 +27,3 @@ "name": "egg",

"shipping",
"shipment",
"ems",

@@ -34,3 +35,4 @@ "koreapost",

"auspost",
"australia post"
"australia post",
"usps"
],

@@ -37,0 +39,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc