# @abdurrahmanbd/bd-institution-list 中文文档

规范地址：https://npmcn.com/package/%40abdurrahmanbd/bd-institution-list/

版本：1\.1\.0
npm 元数据更新时间：2026-08-12T11:49:17.487Z
中文译文更新时间：2026-11-06T15:36:01.800Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40abdurrahmanbd/bd-institution-list
原文对照：https://npmcn.com/package/%40abdurrahmanbd/bd-institution-list/?lang=original
项目主页：https://bd-institution-list-by-abdurrahman.vercel.app/
源码仓库：https://github.com/abdurrahmanmahmud5981/bd-institution-list-by-abdurrahman

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：7.4 MB，26 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：2 个
- 首次发布：2026-08-09T08:14:59.891Z
- 最新版本发布：2026-08-12T11:49:17.155Z
- 近 30 天下载量：2884（2026-10-05 至 2026-11-03，npm 官方下载统计）
- 已发布版本数：9（近 12 个月 9 个）

## 中文简介

为所有孟加拉国教育机构(学校、学院、大学、马德拉萨斯)提供综合、快速、文字和本土的国家预防机制一揽子计划。 支持 O(1) EIIN 查询、搜索和分类过滤器.

## 安装

```sh
npm install @abdurrahmanbd/bd-institution-list
```

也可以使用：`pnpm add @abdurrahmanbd/bd-institution-list`、`yarn add @abdurrahmanbd/bd-institution-list`、`bun add @abdurrahmanbd/bd-institution-list`

## README

# @abdurrahmanbd/bd-机构列表

[![npm version](https://img.shields.io/npm/v/@abdurrahmanbd/bd-institution-list.svg?style=flat-square)](https://www.npmjs.com/package/@abdurrahmanbd/bd-institution-list) [![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/abdurrahmanmahmud5981/bd-institution-list-by-abdurrahman)

我建立这个计划是因为我需要一种快速的方法, 来寻找孟加拉教育机构的EIIN号码, 于是我整理出一个 32,000 + 学校,学院,大学, 和Madrashas 的 干净,打字的数据集, 并把它包裹在一个简单的API中.

EIIN检索为O(1),因为数据在构建时被预索引为地图. 没有网络呼叫,没有数据库——一切运行在客户端的内存中.

**[Live Demo 和游戏场 ~](https://bd-institution-list-by-abdurrahman.vercel.app/)**

* * *

## 盒子里的东西

-   **O(1) EIIN 检索** ——通过EIIN号码,立即取回机构. 它在引擎盖下使用预建的地图,所以没有迭代.
-   **双语搜索( L)** ——按机构名称,简称查询`BUET`),区,分区,upazila,或EIIN. 不区分大小写,处理部分匹配.
-   **32 000多个机构** ——学校(bangla & 英语媒体),学院,公立和私立大学,国立大学,aliya & qawmi madrashas.
-   **无害环境管理+CJS** - 与双方合作 `import` 财务报告和审定财务报表 `require`船舶 `.d.ts` 文档可以自动完成编辑器.
-   **无依赖关系** - 刚刚安装和使用。 没有别的东西可以设置.

* * *

## 安装

```bash
npm install @abdurrahmanbd/bd-institution-list
```

或者如果你喜欢pnpm/yarn:

```bash
pnpm add @abdurrahmanbd/bd-institution-list
# or
yarn add @abdurrahmanbd/bd-institution-list
```

* * *

## 使用量

### 带有ES模块

```typescript
import {
  searchInstitutes,
  getInstituteByEiin,
  getUniversities,
  getSchools,
  getColleges,
  getMadrashas,
} from "@abdurrahmanbd/bd-institution-list";

// search by name
const results = searchInstitutes("BUET");

// O(1) lookup by EIIN
const school = getInstituteByEiin(100003);
// => { eiin: 100003, name: "DAKSHIN KATHALIA TAZEM ALI SECONDARY SCHOOL", institutionType: "school", version: "bangla" }

// grab all public universities
const publicUnis = getUniversities({ category: "public" });

// english medium schools only
const englishSchools = getSchools({ version: "english" });

// all madrashas (aliya + qawmi)
const madrashas = getMadrashas();
```

### 带有共同JS

```javascript
const {
  searchInstitutes,
  getInstituteByEiin,
  getUniversities,
} = require("@abdurrahmanbd/bd-institution-list");

const results = searchInstitutes("Dhaka College");
```

* * *

## 子路径导出( 优化导入大小)

对于更小的捆绑大小,只导入所需的特定数据集:

```typescript
// Import only universities (~0.13 kB entry, shared data chunk)
import { getUniversities, publicUniData, privateUniData, nuUniData }
  from "@abdurrahmanbd/bd-institution-list/universities";

// Import only schools
import { getSchools, schoolData, englishMediumData }
  from "@abdurrahmanbd/bd-institution-list/schools";

// Import only colleges
import { getColleges, collegeData }
  from "@abdurrahmanbd/bd-institution-list/colleges";

// Import only madrashas (aliya + qawmi data, getMadrashas function)
import { getMadrashas, madrashaData, qawmiMadrashaData }
  from "@abdurrahmanbd/bd-institution-list/madrashas";
```

* * *

## API 密码

### `searchInstitutes(query, options?)`

按名称(英语/Bengali),地点(区,分区,upazila),简称,或EIIN. 结果排出:准确匹配先,然后启动With,然后包含.

```typescript
searchInstitutes("ঢাকা", { type: "college", limit: 10 });
searchInstitutes("Sylhet", { type: "university" });
searchInstitutes(100003); // search by EIIN as a number
```

* * *

### `getInstituteByEiin(eiin)`

用EIIN的号码查查一个机构 返回机构或 `undefined`。这是 O(1) —— 直取地图,而不是扫描.

```typescript
const inst = getInstituteByEiin(100015);
```

* * *

### `getInstitutesByEiins(eiins)`

由EIIN数字列表进行批量检索. 每一次检查都是O(1). 返回只找到机构(漏掉 EIINs 被悄悄跳过) .

```typescript
const list = getInstitutesByEiins([100003, 100015, 100027]);
```

* * *

### `getAllInstitutes(options?)`

得到所有的机构。 通过过滤选项缩小范围,并用 `page` 财务报告和审定财务报表 `limit`。 。 。 .

```typescript
const firstPage = getAllInstitutes({ page: 1, limit: 50 });
const dhakaColeges = getAllInstitutes({ type: "college", district: "Dhaka" });
```

* * *

### `getSchools(options?)`

获得所有学校(孟加拉语、英语)。 支持过滤 `version`。 。 。 .

```typescript
const banglaSchools = getSchools({ version: "bangla" });
const englishSchools = getSchools({ version: "english" });
```

* * *

### `getColleges(options?)`

把孟加拉国所有的大学都弄来.

```typescript
const colleges = getColleges({ limit: 20 });
```

* * *

### `getUniversities(options?)`

获得所有大学——公立,私立,国立. 过滤器由 `category` 或者说 `department`。 。 。 .

```typescript
const medicalUnis = getUniversities({ category: "public", department: "medical" });
const privateUnis = getUniversities({ category: "private" });
```

* * *

### `getMadrashas(options?)`

得到所有的疯狂——阿利亚和卡米。 支持所有标准过滤选项.

```typescript
const allMadrashas = getMadrashas();
const dhakaM = getMadrashas({ district: "Dhaka", limit: 20 });
```

* * *

### `getInstitutesByDistrict(district, type?)`

按区名过滤的简称. 可选限于特定类型的机构.

```typescript
const sylhetSchools = getInstitutesByDistrict("Sylhet", "school");
const allInChittagong = getInstitutesByDistrict("Chittagong");
```

* * *

### `getInstitutesByDivision(division, type?)`

按分区名称过滤的简称 .

```typescript
const dhakaDiv = getInstitutesByDivision("Dhaka", "university");
```

* * *

### `getInstitutesByUpazila(upazila, type?)`

用Upazila名进行过滤的简称.

```typescript
const mirpurSchools = getInstitutesByUpazila("Mirpur", "school");
```

* * *

### `countInstitutes(options?)`

计算匹配可选过滤选项的机构 。 需要总数而不获取所有记录时有用 .

```typescript
countInstitutes();                          // 32544 — total
countInstitutes({ type: "university" });    // all universities
countInstitutes({ type: "school", district: "Dhaka" }); // schools in Dhaka
```

* * *

### `getAllDistricts(type?)`

获取数据集中所有唯一区名的排序列表 。 可选限于一种类型的机构.

```typescript
const districts = getAllDistricts();           // all districts
const uniDistricts = getAllDistricts("university"); // only where unis exist
```

* * *

### `getAllDivisions(type?)`

获取数据集中所有唯一分区名称的排序列表 .

```typescript
const divisions = getAllDivisions();
```

* * *

## 过滤选项

所有获取器函数接受可选过滤对象 :

```typescript
{
  type?: "school" | "college" | "university" | "madrasha";
  version?: "bangla" | "english" | "arabic";        // schools & madrashas
  category?: "public" | "private" | "national";     // universities
  department?: "general" | "engineering" | "medical" | "agricultural" | "textile" | "dental";
  district?: string;   // case-insensitive substring match
  division?: string;   // case-insensitive substring match
  upazila?: string;    // case-insensitive substring match
  limit?: number;      // max records to return (default: all)
  page?: number;       // 1-indexed page number (works with limit)
}
```

> **关于地点数据的说明**数字 : `district`, (中文(简体) ), `division`,以及 `upazila` 过滤完全适用于大学和疯人院。 学校和学院目前在数据集中的位置数据有限——这些类型的位置过滤器返回的结果可能较少.

* * *

## 数据覆盖

| 数据集 | 记录 |
| --- | --- |
| 孟加拉中学 | 19,302 (英语) |
| 阿里娅·马德拉萨斯 | 9 358个 |
| 国立大学学院 | 2,295个 |
| 私立大学 | 页:1 |
| 学院 | 896号 |
| 公立大学 | 107国 |
| 卡夫米·马德拉萨斯 | 页:1 |
| 英语中学 | 118 (韩语) |
| **共计** | **32 544个** |

* * *

## 捐款

如果您发现任何缺失的机构或错误的数据,请随意打开一个问题或发送公关.

> **说明:** 此寄存器目前设置为私有 。 如果你想捐款,请先联系我 这样我就可以允许你进入.. [阿卜杜勒·拉赫曼](https://github.com/abdurrahmanmahmud5981)。 。 。 .

## 许可证

麻省理工学院 - [阿卜杜勒·拉赫曼](https://github.com/abdurrahmanmahmud5981)

## 常见问题

### @abdurrahmanbd/bd-institution-list 是什么？

为所有孟加拉国教育机构\(学校、学院、大学、马德拉萨斯\)提供综合、快速、文字和本土的国家预防机制一揽子计划。 支持 O\(1\) EIIN 查询、搜索和分类过滤器\.

### 如何安装 @abdurrahmanbd/bd-institution-list？

在项目目录运行 npm install @abdurrahmanbd/bd-institution-list，或使用 pnpm add / yarn add / bun add。

### @abdurrahmanbd/bd-institution-list 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @abdurrahmanbd/bd-institution-list 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @abdurrahmanbd/bd-institution-list 可以商用吗？

@abdurrahmanbd/bd-institution-list 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @abdurrahmanbd/bd-institution-list 的下载量有多少？

根据 npm 官方下载统计，@abdurrahmanbd/bd-institution-list 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,884 次，日均约 96 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @abdurrahmanbd/bd-institution-list 还在维护吗？

最新版本 1\.1\.0 发布于 2026/08/12（2 个月前）；至今共发布 9 个版本，其中过去 12 个月发布了 9 个；首次发布于 2026/08/09。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

