name-of-person
v1.0.0
Published
Presenting names for English-language applications where a basic model of first and last name(s) combined is sufficient.
Downloads
5
Readme
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