Socket
Book a DemoInstallSign in
Socket

@jschang19/ntu-studentid-lookup

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jschang19/ntu-studentid-lookup

臺灣大學學號找尋對應系所

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source

NTU Student ID Lookup

臺灣大學學號找尋對應系所

由於轉雙輔系生學號為原系所學號,因此只會輸出原學號之對應系所。

Usage

  • Install the package
npm install --save ntu-studentid-lookup
  • Call and use it
const lookup = require('ntu-studentid-lookup')

let department
try {
  department = lookup({ studentId: 'T09902345' })
} catch (error) {
  // INVALID_FORMAT or INVALID_DEPARTMENT_CODE
}

console.log(department)
// '資工系'

Test

npm run test

We covered:

  • First character uppercase with legal department code. (Ex. B09902007)
  • First character lowercase with legal department code. (Ex. b09902007)
  • General Student Id lookup to make sure the function is working normally. (Ex. For EE ID - B09901001)
  • Illegal department code validation. (Ex. B09Z01001)
  • Illegal format (Length) validation. (Ex. b09Z0200)

FAQs

Package last updated on 29 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts