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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@classytic/bd-areas

v1.0.0

Published

Bangladesh delivery areas with multi-provider support (RedX, Pathao, Steadfast) - 8 divisions, 64 districts, 2836+ areas

Downloads

30

Readme

@classytic/bd-areas

Bangladesh delivery areas with multi-provider support. Contains 8 divisions, 64 districts, and 2836 areas with provider-specific IDs for RedX, Pathao, and Steadfast.

Installation

npm install @classytic/bd-areas

Features

  • Complete BD Coverage: 8 divisions, 64 districts, 2836 delivery areas
  • Multi-Provider Support: Area IDs for RedX, Pathao, Steadfast
  • TypeScript First: Full type definitions
  • Tree-Shakeable: Import only what you need
  • Browser + Node: Works in both environments

Usage

Frontend - Cascading Dropdowns

import {
  getDivisions,
  getDistrictsByDivision,
  getAreasByDistrict,
  searchAreas,
} from '@classytic/bd-areas';

// Get all divisions for first dropdown
const divisions = getDivisions();
// [{ id: 'dhaka', name: 'Dhaka', nameLocal: 'ঢাকা' }, ...]

// When user selects a division, get districts
const districts = getDistrictsByDivision('dhaka');
// [{ id: 'dhaka', name: 'Dhaka', divisionId: 'dhaka', ... }, ...]

// When user selects a district, get areas
const areas = getAreasByDistrict('dhaka');
// [{ internalId: 1, name: 'Mohammadpur', providers: { redx: 1 }, ... }, ...]

// Autocomplete search
const results = searchAreas('mirpur');

Backend - Area Resolution

import {
  getArea,
  resolveArea,
  getAreaByProvider,
  convertProviderId,
} from '@classytic/bd-areas';

// Get area by internal ID (from your database)
const area = getArea(1);
// { internalId: 1, name: 'Mohammadpur', providers: { redx: 1 }, ... }

// Get full area with division/district objects
const resolved = resolveArea(1);
// { ...area, division: { id: 'dhaka', name: 'Dhaka', ... }, district: { ... } }

// Get area by provider-specific ID
const areaFromRedx = getAreaByProvider('redx', 1);

// Convert between provider IDs
const pathaoId = convertProviderId('redx', 1, 'pathao');

API Reference

Division Functions

| Function | Description | |----------|-------------| | getDivisions() | Get all 8 divisions | | getDivisionById(id) | Get division by ID | | getDivisionByName(name) | Get division by name |

District Functions

| Function | Description | |----------|-------------| | getDistrictsByDivision(divisionId) | Get districts in a division | | getDistrictById(id) | Get district by ID | | getAllDistricts() | Get all 64 districts |

Area Functions

| Function | Description | |----------|-------------| | getArea(internalId) | Get area by internal ID | | getAreaByProvider(provider, providerId) | Get area by provider-specific ID | | getAreasByDistrict(districtId) | Get areas in a district | | getAreasByDivision(divisionId) | Get areas in a division | | getAreasByPostCode(postCode) | Get areas by postal code | | getAllAreas() | Get all 2836 areas | | searchAreas(query, limit?) | Search areas by name/postcode/district | | resolveArea(internalId) | Get area with full division/district objects | | convertProviderId(from, id, to) | Convert between provider area IDs |

Statistics

import { getStats } from '@classytic/bd-areas';

const stats = getStats();
// {
//   divisions: 8,
//   districts: 64,
//   areas: 2836,
//   providerCoverage: { redx: 2836, pathao: 0, steadfast: 0 },
//   byDivision: [{ division: 'Dhaka', districts: 13, areas: 1295 }, ...]
// }

Types

interface Division {
  id: string;
  name: string;
  nameLocal: string; // Bengali name
}

interface District {
  id: string;
  name: string;
  divisionId: string;
  divisionName: string;
}

interface Area {
  internalId: number;  // Use this in your database
  name: string;
  postCode: number | null;
  zoneId: number;
  districtId: string;
  districtName: string;
  divisionId: string;
  divisionName: string;
  providers: {
    redx?: number;
    pathao?: number;
    steadfast?: number;
  };
}

Best Practices

Store Internal ID in Your Database

// When saving customer address
const area = searchAreas('mohammadpur')[0];
await saveAddress({
  areaId: area.internalId,  // Store this
  areaName: area.name,
  district: area.districtName,
  division: area.divisionName,
});

Get Provider ID When Making API Calls

// When creating shipment with RedX
const area = getArea(savedAddress.areaId);
const redxAreaId = area.providers.redx;

await redxClient.createParcel({
  deliveryAreaId: redxAreaId,
  // ...
});

License

MIT © Classytic