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

@keminghe/osu

v2.0.1

Published

Unofficial, publicly available data about The Ohio State University.

Downloads

71

Readme

@keminghe/osu

[!IMPORTANT]

Versions 1.1.0 and below are DEPRECATED! Please upgrade to the latest version.

[!NOTE]

Build by students, for students, with :heart:. NOT affiliated nor endorsed by official OSU.

  • Publicly-available data about OSU undergrad majors here.
  • Publicly-available data about OSU student organizations here.

:gear: Installation

Requires Node.js >= 14

# Using npm:
npm install @keminghe/osu

# Using yarn:
yarn add @keminghe/osu

# Using pnpm: (recommended)
pnpm add @keminghe/osu

:rocket: Quickstart

Using Validators

// Using OSU email validator functions.
import {
  isNameDotNum,
  isOSUDotEduEmail,
  isBuckeyemail,
  isOSUEmail,
} from "@keminghe/osu";

isNameDotNum("buckeye.1");                      // true
isOSUDotEduEmail("[email protected]");          // true
isBuckeyemail("[email protected]"); // true
isOSUEmail("[email protected]");                // false

Using RegExp Patterns

// Using OSU name dot num and email RegExp patterns.
import {
  NAME_DOT_NUM_PATTERN,
  OSU_DOT_EDU_EMAIL_PATTERN,
  BUCKEYEMAIL_PATTERN
} from "@keminghe/osu";

NAME_DOT_NUM_PATTERN.test("buckeye.1");                         // true
OSU_DOT_EDU_EMAIL_PATTERN.test("[email protected]");            // true
BUCKEYEMAIL_PATTERN.test("[email protected]");  // true

Accessing Undergrad Majors Data

import { getUndergradMajors, type UndergradMajor } from "@keminghe/osu";

const majors: UndergradMajor[] = getUndergradMajors();
console.log(majors);

Accessing Student Organization Data

import { getStudentOrgs, type StudentOrg } from "@keminghe/osu";

const orgs: StudentOrg[] = getStudentOrgs();
console.log(orgs);

(DEPRECATED v1.1.0) Using Validators

import { isNameDotNumber, isOSUEmail, isBuckeyemail, isOSUOrBuckeyemail } from "@keminghe/osu";
const flag1 = isNameDotNumber("brutus.1");                    // true
const flag2 = isNameDotNumber("adams-brown-catlyn.3");        // true
const flag3 = isOSUEmail("[email protected]");                 // true
const flag4 = isBuckeyemail("[email protected]");  // true
const flag5 = isOSUOrBuckeyemail("[email protected]");        // false

(DEPRECATED v1.1.0) Accessing Undergraduate Majors and Degrees

import osu from "@keminghe/osu";

const majors = osu.undergrad.majors;
console.log(majors);

(DEPRECATED v1.1.0) Accessing Student Organizations

import osu from "@keminghe/osu";

const studentOrgs = osu.studentOrgs;
console.log(studentOrgs);

:blue_book: API

StudentOrg Type

/**
 * TypeScript type inferred from the `StudentOrg` Zod schema.
 *
 * This type represents the structure of a student organization object as defined by the `StudentOrg` schema.
 *
 * @typedef {Object} StudentOrg
 * @property {string} name - Name of the student organization, represented by a non-empty string.
 * @property {string | null} purposeStatement - Purpose statement of the student organization, represented by a non-empty string, or null if not applicable or missing data.
 * @property {Campus[] | null} campuses - Campuses where the student organization is active, represented by a non-empty array of `Campus` objects, or null if not applicable or missing data.
 * @property {StudentOrgCategory[] | null} categories - Categories of the student organization, represented by a non-empty array of `StudentOrgCategory` objects, or null if not applicable or missing data.
 */
export type StudentOrg = z.infer<typeof StudentOrgSchema>;

UndergradMajor Type

/**
 * TypeScript type inferred from the `UndergradMajor` Zod schema.
 *
 * This type represents the structure of an undergraduate major object as defined by the `UndergradMajor` schema.
 *
 * @typedef {Object} UndergradMajor
 * @property {string} major - Name of the major, represented by a non-empty string.
 * @property {UndergradDegree[] | null} degrees - Array of undergraduate degrees associated with the major, represented by a non-empty array of `UndergradDegree` objects, or null if not applicable or missing data.
 * @property {Campus[] | null} campuses - Campuses where the major is offered, represented by a non-empty array of `Campus` objects, or null if not applicable or missing data.
 * @property {College | null} college - College where the major belongs, represented by a `College` object, or null if not applicable or missing data.
 *
 * @see {@link UndergradMajorInterface} for the equivalent native TypeScript interface.
 */
export type UndergradMajor = z.infer<typeof UndergradMajorSchema>;

:key: License

Usage indicates agreement with the MIT license. More Info.

:seedling: Community

Alt