npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

binfo

v1.0.1

Published

A high-performance npm package that provides card BIN (Bank Identification Number) information quickly and efficiently with SQL.

Downloads

32

Readme

Installation

Using npm:

$ npm install binfo

Other Installations:

$ yarn add binfo
$ pnpm add binfo

Usage

import bin, { CardBrand, CardType, CardLevel } from 'binfo';
/* For CommonJS */
/* const bin = require('binfo'); */

async function binCheck() {


    /* Find Bin - Promise<BinResponse> */


   var findBin = await bin.findBin({ bin: '999960' });
   console.log(findBin); 
   /* Output:
   {
  bin: '999960',
  card: { brand: 'LOCAL BRAND', type: 'DEBIT', level: 'PREPAID' },
  bank: { name: 'BC CARD', website: '', phone: '+8215884000' },
  country: {
    name: 'KOREA, REPUBLIC OF',
    code: 'KR',
    iso3: 'KOR',
    emoji: '🇰🇷'
  },
  currency: 'KRW'
}
   */



   /* Search Bin List - Promise<BinResponse[]> */


    var findBins = await bin.findBins({ currency: 'USD' },{ $limit: 5 });
    console.log(findBins);
    /* Output:
    [{
    bin: '223009',
    card: { brand: 'MASTERCARD', type: 'DEBIT', level: 'ENHANCED' },
    bank: {
      name: 'COMPUTER SERVICES, INC.',
      website: '',
      phone: '+18005454274'
    },
    country: { name: 'UNITED STATES', code: 'US', iso3: 'USA', emoji: '🇺🇸' },
    currency: 'USD'
  },
  {
    bin: '223013',
    card: { brand: 'MASTERCARD', type: 'DEBIT', level: 'ENHANCED' },
    bank: {
      name: 'COMPUTER SERVICES, INC.',
      website: '',
      phone: '+18005454274'
    },
    country: { name: 'UNITED STATES', code: 'US', iso3: 'USA', emoji: '🇺🇸' },
    currency: 'USD'
  },
  {
    bin: '223019',
    card: { brand: 'MASTERCARD', type: 'DEBIT', level: 'BUSINESS' },
    bank: {
      name: 'COMPUTER SERVICES, INC.',
      website: '',
      phone: '+18005454274'
    },
    country: { name: 'UNITED STATES', code: 'US', iso3: 'USA', emoji: '🇺🇸' },
    currency: 'USD'
  },
  {
    bin: '223020',
    card: { brand: 'MASTERCARD', type: 'CREDIT', level: 'STANDARD' },
    bank: { name: 'CAJA CENTRAL FINANCOOP', website: '', phone: '' },
    country: { name: 'ECUADOR', code: 'EC', iso3: 'ECU', emoji: '🇪🇨' },
    currency: 'USD'
  },
  {
    bin: '223021',
    card: { brand: 'MASTERCARD', type: 'CREDIT', level: 'STANDARD' },
    bank: { name: 'CAJA CENTRAL FINANCOOP', website: '', phone: '' },
    country: { name: 'ECUADOR', code: 'EC', iso3: 'ECU', emoji: '🇪🇨' },
    currency: 'USD'
  }]
    */



    /* Create Bin - Promise<boolean> */


    var createBin = await bin.createBin({ bin: '999999', cardBrand: 'LOCAL', cardType: 'TEST', cardLevel: 'TEST', bankName: 'Bes-js', bankWebsite: 'https://github.com/Bes-js', bankPhone: '+123456789', countryName: 'Türkiye', countryCode: 'BES', countryIso3: 'BES-JS', currency: 'TRY' });
    console.log(createBin);
    /* Output:
    true
    */


    /* Update Bin - Promise<boolean> */


    var updateBin = await bin.updateBin({ bin: '999999' }, { bin: '123456', cardBrand: 'TEST' });
    console.log(updateBin);
    /* Output:
    true
    */


    /* Delete Bin - Promise<boolean> */


    var deleteBin = await bin.deleteBin({ bin: '123456' });
    console.log(deleteBin);
    /* Output:
    true
    */


};

binCheck();

License

binfo is licensed under the MIT License. See the LICENSE file for details.

Support

Discord Banner