2.7.0 • Published 10 months ago

humanparser v2.7.0

Weekly downloads
13,942
License
MIT
Repository
github
Last release
10 months ago

humanparser

NPM

Parse a human name string into salutation, first name, middle name, last name, suffix.

Install

npm install humanparser

Usage

const human = require('humanparser');

parse human name

const fullName = 'Mr. William R. Hearst, III';
const attrs = human.parseName(fullName);

console.log(attrs);

//produces the following output

{ 
    salutation: 'Mr.',
    firstName: 'William',
    suffix: 'III',
    lastName: 'Hearst',
    middleName: 'R.',
    fullName: 'Mr. William R. Hearst, III'
}
  

get fullest name in string

const name = 'John & Peggy Sue';
const fullName = human.getFullestName(name);

//produces the following output
{
    fullName: 'Peggy Sue'
}
  

parse address

const address = '123 Happy Street, Honolulu, HI  65780';
const parsed = human.parseAddress(address);

//produces the following output    
{
    address: '123 Happy Street',
    city: 'Honolulu',
    state: 'HI',
    zip: '65780',
    fullAddress: '123 Happy Street, Honolulu, HI  65780'
}
2.7.0

10 months ago

2.6.0

4 years ago

2.3.0

4 years ago

2.2.0

4 years ago

2.5.0

4 years ago

2.4.0

4 years ago

2.0.2

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.11.0

5 years ago

1.10.0

5 years ago

1.9.0

6 years ago

1.8.2

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.0

6 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

9 years ago

0.0.17

9 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago