Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
iin-checker
Advanced tools
Issuer identification number checker which returns details about a credit/debit card
Issuer identification number checker which returns details about a credit/debit and other payment cards
The module is available in the NPM registery. It can be installed using the
npm
commandline utlity.
npm install iin-checker
Once you have installed the module you can simply require inside of your Node.js application and use it's exported methods. Here is a simple example of that which gets the card details back as an object:
var IinChecker = require( 'iin-checker' );
// Initialise with default options no caching
var iin = new IinChecker( {} );
// Initialise with caching
var iin = new IinChecker( {
cache: {
set: function( iin, cardDetails ) {...},
get: function( iin ) {..}
}
} );
iin.lookup( '543210', function( err, result ) {
if ( err ) {
console.log( 'Error:', err );
} else {
console.log( 'Result:', result );
}
} );
Caching is turned off by default. It can be turned on by passing in options a cache object with your functions to set and get the cache'.
If you want to test to see if the card is a Credit or Debit card you can can achive this in the following way:
var IinChecker = require( 'iin-checker' );
var iin = new IinChecker( {} );
iin.lookup( '543210', function( err, result ) {
if ( err ) {
console.log( 'Error:', err );
} else {
var isDebit = ( result.type === iin.types.DEBIT )
console.log( 'Debit?:', isDebit );
}
} );
Possible values for iin.types are DEBIT, CREDIT and UNKNOWN.
If you want to test to see which brand the card is, you can can achive this in the following way:
var IinChecker = require( 'iin-checker' );
var iin = new IinChecker( {} );
iin.lookup( '543210', function( err, result ) {
if ( err ) {
console.log( 'Error:', err );
} else {
var isMastercard = ( result.brand === iin.brands.MASTERCARD )
console.log( 'Mastercard?:', isMastercard );
}
} );
Possible values for iin.brands are VISA, MASTERCARD, AMEX, DISCOVER, JCB, MAESTRO and LASER. In future more card brands will be supported, if you need a brand adding please raise an issue.
Copyright (c) 2016 Holiday Extras Ltd Licensed under the MIT license.
FAQs
Issuer identification number checker which returns details about a credit/debit card
The npm package iin-checker receives a total of 0 weekly downloads. As such, iin-checker popularity was classified as not popular.
We found that iin-checker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.