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

@apiverve/cardvalidator

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apiverve/cardvalidator - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

23

index.js

@@ -27,4 +27,9 @@ const axios = require('axios');

async execute(query, callback) {
if (!query || typeof query !== 'object') {
throw new Error('Query parameters must be provided as an object.');
if(arguments.length > 1) {
if (!query || typeof query !== 'object') {
throw new Error('Query parameters must be provided as an object.');
}
} else {
callback = query;
query = {};
}

@@ -72,7 +77,11 @@

let url = this.baseURL;
if (Object.keys(query).length > 0) {
const queryString = Object.keys(query)
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(query[key])}`)
.join('&');
url += `?${queryString}`;
if(query && typeof query === 'object')
{
if (Object.keys(query).length > 0) {
const queryString = Object.keys(query)
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(query[key])}`)
.join('&');
url += `?${queryString}`;
}
}

@@ -79,0 +88,0 @@ return url;

{
"name": "@apiverve/cardvalidator",
"version": "1.0.2",
"version": "1.0.3",
"description": "Card Validator is a simple tool for validating if a card number is valid or not. It checks the card number format and the Luhn algorithm to see if the card number is valid.",

@@ -23,11 +23,11 @@ "main": "index.js",

"devDependencies": {
"mocha": "^2.3.4",
"chai": "^3.4.1",
"dotenv": "^2.0.0"
"mocha": "^10.4.0",
"chai": "^5.1.1",
"dotenv": "^16.4.5"
},
"dependencies": {
"node-fetch": "3.3.2",
"promise": "^7.1.1",
"axios": "^0.15.3"
"promise": "^8.3.0",
"axios": "1.6.8"
}
}

@@ -117,3 +117,3 @@ Card Validator API

All usage of the mailboxlayer website, API, and services is subject to the [APIVerve Terms of Service](https://apiverve.com/terms) and all legal documents and agreements.
All usage of the APIVerve website, API, and services is subject to the [APIVerve Terms of Service](https://apiverve.com/terms) and all legal documents and agreements.

@@ -120,0 +120,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