Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duffn/name-of-person
Presenting names for English-language applications where a basic model of first and last name(s) combined is sufficient.
https://github.com/duffn/name-of-person
Last synced: about 2 months ago
JSON representation
Presenting names for English-language applications where a basic model of first and last name(s) combined is sufficient.
- Host: GitHub
- URL: https://github.com/duffn/name-of-person
- Owner: duffn
- License: mit
- Created: 2020-09-27T16:42:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-27T16:43:22.000Z (over 4 years ago)
- Last Synced: 2024-10-18T06:07:19.005Z (3 months ago)
- Language: TypeScript
- Size: 70.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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](https://github.com/basecamp/name_of_person).
## Installation
```bash
yarn add name-of-person
```## Examples
```javascript
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
```bash
yarn test
```## License
[MIT](https://opensource.org/licenses/MIT)