-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-parens.ts
More file actions
24 lines (22 loc) · 780 Bytes
/
test-parens.ts
File metadata and controls
24 lines (22 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { NameEnhanced } from './client/src/lib/NameEnhanced';
const testCases = [
'John Doe (he/him) (Ph.D.)',
'Emily Bouch (she/her)',
'Nancy Kurts - DBA (ABD), MBA',
'Stephen Thompson DC DACM BCTMB FAIHM',
'Jane Smith (they/them) (MD) (ret.)'
];
testCases.forEach(name => {
const parsed = new NameEnhanced(name);
console.log('\n' + '='.repeat(60));
console.log('Input:', name);
console.log('Valid:', parsed.isValid);
console.log('First:', parsed.firstName);
console.log('Last:', parsed.lastName);
console.log('Suffix:', parsed.suffix);
console.log('Nickname:', parsed.nickname);
console.log('Repairs:', parsed.parseLog.length);
parsed.parseLog.forEach(log => {
console.log(' -', log.reason, ':', log.original, '->', log.repaired);
});
});