Bin From Pan

The leading six digits of the card number used to be the
"issuer identification number (IIN)", sometimes referred to as the
"bank identification number (BIN)".
Now there are new BINs which take first 8 digits of card number. This small module
differentiates between 8 digit pans and 6 digit pans. Right now it only detects 8 digit MIR
pans but there can be more of those in future.
Installation
npm install bin-from-pan
Usage
const bin = binFromPan('22011234567890');
Function can throw errors if pan was not valid.