Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auto-detection-carriers

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-detection-carriers - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

.github/workflows/main.yml

4

carriers.js

@@ -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 '';

2

package.json
{
"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 @@

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