Skip to content

Presenting names for English-language applications where a basic model of first and last name(s) combined is sufficient.

License

Notifications You must be signed in to change notification settings

duffn/name-of-person

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

name-of-person

Presenting names for English-language applications where a basic model of first and last name(s) combined is sufficient.

Based off of basecamp/name_of_person.

Installation

yarn add name-of-person

Examples

import NameOfPerson from "name-of-person";

// The only possible error here is not providing a first name.
const name = new NameOfPerson({ firstName: "John", lastName: "Smith" });

name.full(); // John Smith
name.familiar(); // John S.
name.abbreviated(); // J. Smith
name.sorted(); // Smith, John
name.possessive(); // John Smith's
name.initials(); // JS

Tests

yarn test

License

MIT

About

Presenting names for English-language applications where a basic model of first and last name(s) combined is sufficient.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published