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

indian-bank-details

v1.0.4

Published

A Node.js package to search and retrieve Indian bank details by IFSC code, city, bank name, and more.

Downloads

333

Readme

Indian Bank Details Lookup

npm version License

A Node.js library for accessing detailed information about Indian banks. You can easily search for bank details by IFSC code, city, bank name, or any other specific field.

This package is perfect for applications that need to validate bank details, provide a list of banks by location, or fetch bank information for various use cases.

Features

  • Search by IFSC code: Retrieve details of a bank branch using its IFSC code.
  • Search by city: Get all the banks operating in a specific city.
  • Search by bank name: Find all branches of a specific bank.
  • Flexible search: Search by any field such as state, district, MICR code, UPI status, etc.
  • Optimized for performance: Fast lookups and searches.

Installation

To install the package in your Node.js project, run:

npm install indian-bank-details

Usage

Example

First, import the functions into your project:

const { 
  getBankDetailsByIFSC, 
  getBanksByCity, 
  getBanksByBankName, 
  getBanksByField 
} = require('indian-bank-details');

Function Examples

1. Get Bank Details by IFSC Code

Fetch bank details using the IFSC code. If no match is found, an error message is returned.

const bankDetails = getBankDetailsByIFSC('ABHY0065001');
console.log(bankDetails);
// Output: { status: true, data: <bank_details> }

2. Get Banks by City

Find all the banks in a specific city.

const banksInCity = getBanksByCity('Mumbai');
console.log(banksInCity);
// Output: { status: true, data: [<bank_details>] }

3. Get Banks by Bank Name

Search for all branches of a particular bank.

const banksByName = getBanksByBankName('Abhyudaya Co-operative Bank');
console.log(banksByName);
// Output: { status: true, data: [<bank_details>] }

4. Search by Any Field (Flexible Search)

You can search by any field such as DISTRICT, STATE, CITY, MICR, RTGS, IMPS, UPI, and more. Here are a few examples:

  • Search by District:
const banksByDistrict = getBanksByField('DISTRICT', 'Mumbai');
console.log(banksByDistrict);
// Output: { status: true, data: [<bank_details>] }
  • Search by State:
const banksByState = getBanksByField('STATE', 'Maharashtra');
console.log(banksByState);
// Output: { status: true, data: [<bank_details>] }
  • Search by RTGS Availability:
const banksByRTGS = getBanksByField('RTGS', true);
console.log(banksByRTGS);
// Output: { status: true, data: [<bank_details>] }
  • Search by UPI Availability:
const banksByUPI = getBanksByField('UPI', true);
console.log(banksByUPI);
// Output: { status: true, data: [<bank_details>] }

Available Fields for Flexible Search

The following fields are available for flexible searches:

  • IFSC - IFSC code of the bank
  • ADDRESS - Full address of the branch
  • BANK - Name of the bank
  • BANKCODE - Bank code
  • BRANCH - Branch name
  • CENTRE - Central location
  • CITY - City where the branch is located
  • CONTACT - Branch contact number
  • DISTRICT - District where the branch is located
  • IMPS - Availability of IMPS (Immediate Payment Service)
  • ISO3166 - ISO 3166 country code
  • MICR - Magnetic Ink Character Recognition code
  • NEFT - Availability of NEFT (National Electronic Funds Transfer)
  • RTGS - Availability of RTGS (Real-Time Gross Settlement)
  • STATE - State where the branch is located
  • SWIFT - SWIFT code
  • UPI - Availability of UPI (Unified Payments Interface)
  • createdAt - Timestamp when the record was created
  • updatedAt - Timestamp when the record was last updated

API

getBankDetailsByIFSC(IFSC: string)

Fetch the bank details for a given IFSC code.

  • Parameters:
    • IFSC: A string representing the IFSC code.
  • Returns:
    • { status: true, data: <bank_details> } if the bank is found.
    • { status: false, error: "No bank found with IFSC code: <IFSC>" } if no bank is found.

getBanksByCity(city: string)

Get all banks located in the specified city.

  • Parameters:
    • city: The name of the city (e.g., "Mumbai").
  • Returns:
    • { status: true, data: [<bank_details>] } if banks are found.
    • { status: false, error: "No banks found in the city: <city>" } if no banks are found.

getBanksByBankName(bankName: string)

Get all branches of the specified bank.

  • Parameters:
    • bankName: The name of the bank (e.g., "Abhyudaya Co-operative Bank").
  • Returns:
    • { status: true, data: [<bank_details>] } if banks are found.
    • { status: false, error: "No banks found with the name: <bankName>" } if no banks are found.

getBanksByField(field: string, value: any)

Search for banks by any given field (e.g., city, state, RTGS, UPI, etc.).

  • Parameters:
    • field: The field to search by (e.g., "DISTRICT", "STATE", "UPI").
    • value: The value to search for (e.g., "Mumbai", true).
  • Returns:
    • { status: true, data: [<bank_details>] } if banks are found.
    • { status: false, error: "No banks found for <field>: <value>" } if no banks are found.

License

This project is licensed under the MIT License - see the LICENSE file for details.


### Key Points

1. Installation: Describes how to install your package using npm.
2. Usage: Provides clear, actionable examples for developers on how to use the functions.
3. API: Describes each function and its parameters, as well as the return values.
4. Fields: Lists all the available fields that users can use for flexible searches.
5. Contributing: Provides instructions on how others can contribute to the project.
6. Badges: Includes NPM version and license badges at the top of the README for better visibility on NPM.