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.9.3 to 0.9.4

3

CHANGELOG.md

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

# 0.9.4
* Added exception logic for unaligned shipping information.
# 0.9.3

@@ -2,0 +5,0 @@ * add a status value to the rincos checkpoint message information.

9

lib/index.js

@@ -102,7 +102,8 @@ 'use strict'

var status = STATUS.PENDING
var isDelivered = false
var latestCheckpoint = null
for (var i = 0; i < checkpoints.length; i++) {
if (checkpoints[i].time) {
isDelivered = isDelivered || checkpoints[i].status === STATUS.DELIVERED
if ((checkpoints[i].status === STATUS.DELIVERED || latestCheckpoint === null) && checkpoints[i].time) {
latestCheckpoint = checkpoints[i]
break
}

@@ -112,3 +113,5 @@ }

if (latestCheckpoint) {
status = latestCheckpoint.status
// Last checkpoint information is not final information.
// The order may be mixed when the local delivery company progresses.
status = isDelivered ? STATUS.DELIVERED : latestCheckpoint.status

@@ -115,0 +118,0 @@ if ([STATUS.IN_TRANSIT, STATUS.FAIL_ATTEMPT].indexOf(status) !== -1) {

{
"name": "delivery-tracker",
"version": "0.9.3",
"version": "0.9.4",
"author": {

@@ -5,0 +5,0 @@ "name": "egg",

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