2.0.1 • Published 2 years ago

ntu-studentid-lookup v2.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

NTU Student ID Lookup

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

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

Usage

  1. Install the package
npm install --save ntu-studentid-lookup
  1. 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: 1. First character uppercase with legal department code. (Ex. B09902007) 2. First character lowercase with legal department code. (Ex. b09902007) 3. General Student Id lookup to make sure the function is working normally. (Ex. For EE ID - B09901001) 4. Illegal department code validation. (Ex. B09Z01001) 5. Illegal format (Length) validation. (Ex. b09Z0200)

2.0.1

2 years ago

2.0.0

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago