Package Exports
- degrees-list
- degrees-list/package.json
Readme
College Degrees List 🎓
A comprehensive, production-ready npm package containing 393 college degrees and academic qualifications for React dropdown components, forms, and educational applications.
🚀 Features
- ✅ 393 comprehensive degree types (Associate, Bachelor's, Master's, Doctoral, Certificates)
- ✅ TypeScript support with full type definitions
- ✅ Multiple export formats (arrays, objects, React Select compatible)
- ✅ Utility functions for searching, filtering, and validation
- ✅ Zero dependencies - lightweight and fast
- ✅ Tree-shakable - import only what you need
- ✅ Production ready - tested and optimized
📦 Installation
npm install degrees-listyarn add degrees-listpnpm add degrees-list🎯 Quick Start
Basic Usage
import { degreesList, degreesOptions } from "degrees-list";
// Simple array of all degrees
console.log(degreesList);
// ['Associate of Arts (AA)', 'Bachelor of Science (BS)', ...]
// React Select compatible format
console.log(degreesOptions);
// [{ value: 'associate_of_arts_aa', label: 'Associate of Arts (AA)', level: 'associate' }, ...]React Dropdown Component
import React, { useState } from "react";
import { degreesList } from "degrees-list";
function DegreeDropdown() {
const [selectedDegree, setSelectedDegree] = useState("");
return (
<div>
<label htmlFor="degree-select">Select Your Degree:</label>
<select
id="degree-select"
value={selectedDegree}
onChange={(e) => setSelectedDegree(e.target.value)}
>
<option value="">-- Select a degree --</option>
{degreesList.map((degree, index) => (
<option key={index} value={degree}>
{degree}
</option>
))}
</select>
</div>
);
}
export default DegreeDropdown;React Select Integration
import React, { useState } from "react";
import Select from "react-select";
import { degreesOptions } from "degrees-list";
function AdvancedDegreeSelector() {
const [selectedDegree, setSelectedDegree] = useState(null);
return (
<Select
options={degreesOptions}
value={selectedDegree}
onChange={setSelectedDegree}
placeholder="Search and select degree..."
isSearchable
isClearable
/>
);
}
export default AdvancedDegreeSelector;📚 API Reference
Main Exports
degreesList: string[]
A flat array of all 393 degree names, alphabetically sorted.
import { degreesList } from "degrees-list";
console.log(degreesList.length); // 393degreesOptions: DegreeOption[]
Array of objects with value, label, level, and abbreviation properties - perfect for React Select.
import { degreesOptions } from "degrees-list";
console.log(degreesOptions[0]);
// {
// value: 'associate_of_arts_aa',
// label: 'Associate of Arts (AA)',
// level: 'associate',
// abbreviation: 'AA'
// }degreesByLevel: DegreesByLevel
Degrees organized by education level.
import { degreesByLevel } from "degrees-list";
console.log(degreesByLevel.bachelor);
// ['Bachelor of Arts (BA)', 'Bachelor of Science (BS)', ...]Utility Functions
getDegreesByLevel(level: string): string[]
Get degrees for a specific education level.
import { getDegreesByLevel } from "degrees-list";
const bachelors = getDegreesByLevel("bachelor");
const masters = getDegreesByLevel("master");searchDegrees(query: string): string[]
Search degrees by query string.
import { searchDegrees } from "degrees-list";
const engineeringDegrees = searchDegrees("engineering");
const businessDegrees = searchDegrees("business");filterDegreesByLevel(levels: string[]): DegreeOption[]
Filter degrees by multiple education levels.
import { filterDegreesByLevel } from "degrees-list";
const graduateDegrees = filterDegreesByLevel(["master", "doctoral"]);
const undergraduateDegrees = filterDegreesByLevel(["associate", "bachelor"]);getDegreeStats(): object
Get statistics about the degrees collection.
import { getDegreeStats } from "degrees-list";
console.log(getDegreeStats());
// {
// total: 393,
// byLevel: { associate: 25, bachelor: 124, master: 90, doctoral: 59, certificate: 95 },
// withAbbreviations: 322
// }isValidDegree(degree: string): boolean
Validate if a degree exists in the collection.
import { isValidDegree } from "degrees-list";
console.log(isValidDegree("Bachelor of Science (BS)")); // true
console.log(isValidDegree("Invalid Degree")); // false🎓 Degree Categories
| Level | Count | Examples |
|---|---|---|
| Associate | 25 | AA, AS, AAS, AFA, ABA, AE, AGS, AOS, AVT, AIT, ... |
| Bachelor | 124 | BA, BS, BFA, BBA, BE, BTech, BCS, BEd, BSW, BSN, BArch, LLB, MBBS, BPharm, BCom, BMus, BAS, BLA, BPA, BCJ, BIT, BEnvSc, BPH, BBiomedSc, BHM, BEE, BLing, BDes, ... |
| Master | 90 | MA, MS, MBA, MFA, MEd, ME, MTech, MCS, MSW, MPH, MPA, LLM, MArch, MM, MLS, MDiv, MAS, MPS, MUP, MIB, MIT, MEnvSc, MHM, MBiostat, MDS, ... |
| Doctoral | 59 | PhD, EdD, MD, DMD, DVM, PharmD, PsyD, DPT, DNP, JD, DBA, DEng, DSW, DrPH, DMA, ThD, OD, DC, AuD, OTD, DClinPsy, DHSc, DBiomed, DNSc, DPP, ... |
| Certificate | 95 | Professional Certificate, Graduate Certificate, Industry Certification, Microcredential Certificate, Certificate in Data Analytics, Certificate in Project Management, TESL Certificate, Certificate in Cybersecurity, ... |
💡 Usage Examples
Grouped Dropdown
import { degreesByLevel } from "degrees-list";
function GroupedDegreeSelect() {
return (
<select>
<optgroup label="Associate Degrees">
{degreesByLevel.associate.map((degree) => (
<option key={degree} value={degree}>
{degree}
</option>
))}
</optgroup>
<optgroup label="Bachelor Degrees">
{degreesByLevel.bachelor.map((degree) => (
<option key={degree} value={degree}>
{degree}
</option>
))}
</optgroup>
{/* Continue for other levels... */}
</select>
);
}Multi-Level Filter
import { filterDegreesByLevel } from "degrees-list";
function CustomDegreeFilter({ allowedLevels = ["bachelor", "master"] }) {
const filteredOptions = filterDegreesByLevel(allowedLevels);
return <Select options={filteredOptions} />;
}Search with Autocomplete
import { searchDegrees } from "degrees-list";
function DegreeSearch() {
const [query, setQuery] = useState("");
const [results, setResults] = useState([]);
useEffect(() => {
setResults(searchDegrees(query));
}, [query]);
return (
<div>
<input
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Search degrees..."
/>
<ul>
{results.map((degree) => (
<li key={degree}>{degree}</li>
))}
</ul>
</div>
);
}🔧 TypeScript Support
Full TypeScript definitions included:
import {
DegreeOption,
DegreesByLevel,
degreesList,
degreesOptions,
} from "degrees-list";
const options: DegreeOption[] = degreesOptions;
const degrees: string[] = degreesList;📈 Performance
- Tree-shakable: Import only what you need
- Zero dependencies: No external packages
- Fast: Optimized for production use
🤝 Contributing
- Fork the repository
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request
📄 License
MIT License - see the LICENSE file for details.
🔗 Links
🏷️ Keywords
college degrees education react dropdown select academic university bachelor master doctorate associate qualifications educational-data form-data react-select typescript
Made with ❤️ for the developer community. If this package helps you, please consider giving it a ⭐ on GitHub!