@jschang19/ntu-studentid-lookup
v2.0.2
Published
臺灣大學學號找尋對應系所
Downloads
3
Readme
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
)