forked from joshfraser/JavaScript-Name-Parser
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusage.txt
More file actions
Latest commit
19 lines (15 loc) · 435 Bytes
/
Copy pathusage.txt
File metadata and controls
19 lines (15 loc) · 435 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// based on PHP Name Parser by Josh Fraser (joshfraser.com)
// http://www.onlineaspect.com/2009/08/17/splitting-names/
// ported to JavaScript by Mark Pemburn (pemburnia.com)
// released under Apache 2.0 license
Usage:
var parser = new NameParser();
var parsed = parser.parse("Mr. Chales P. Wooten, III");
Results:
parsed {
salutation: "Mr.",
firstName: "Charles",
initials: "P",
lastName: "Wooten",
suffix: "III"
}