New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

courier_finder

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

courier_finder - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

5

couriers/couriers_please/index.js

@@ -10,5 +10,8 @@ const courier_name = "Couriers Please";

connote = connote.trim().toUpperCase();
return connote.length === 14 && connote.indexOf("CP") === 0;
return (
(connote.length === 14 || connote.length === 15) &&
connote.indexOf("CP") === 0
);
}
module.exports = { courier_name, tracking_url, valid };

3

couriers/couriers_please/index.test.js

@@ -8,2 +8,4 @@ const couriers_please = require("./index");

expect(couriers_please.valid("CP0000E0000000")).toBe(true);
expect(couriers_please.valid("CP000024716400")).toBe(true);
expect(couriers_please.valid("CPWY33000009337")).toBe(true);
});

@@ -14,3 +16,2 @@ });

test("returns false", () => {
expect(couriers_please.valid("CP000024716400")).toBe(false);
expect(couriers_please.valid("CP0000247164")).toBe(false);

@@ -17,0 +18,0 @@ expect(couriers_please.valid("12345")).toBe(false);

{
"name": "courier_finder",
"description": "Find a courier company from a passed in connote.",
"version": "0.0.4",
"version": "0.0.5",
"author": "Rob Zolkos <rob@zolkos.com> ",

@@ -6,0 +6,0 @@ "main": "index.js",

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