1.0.0 • Published 4 years ago

name-of-person v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

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