https://github.com/duffn/name
Presenting names of people in full, familiar, abbreviated, and initialized forms.
https://github.com/duffn/name
go golang hacktoberfest
Last synced: 17 days ago
JSON representation
Presenting names of people in full, familiar, abbreviated, and initialized forms.
- Host: GitHub
- URL: https://github.com/duffn/name
- Owner: duffn
- License: mit
- Created: 2018-09-08T23:12:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-19T22:55:06.000Z (almost 4 years ago)
- Last Synced: 2025-06-04T20:09:45.826Z (29 days ago)
- Topics: go, golang, hacktoberfest
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Name
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).
[](https://godoc.org/github.com/duffn/name)
## Installation
```bash
go get -u github.com/duffn/name
```## Examples
```go
// The only possible error here is not providing a first name.
n, err := name.New("Bob", "Smith")n.Full() // Bob Smith
n.Familiar() // Bob S.
n.Abbreviated() // B. Smith
n.Sorted() // Smith, Bob
n.Possessive() // Bob Smith's
n.Initials() // BS
n.Mentionable() // bobs
```## Tests
```bash
go test
```## License
[MIT](https://opensource.org/licenses/MIT)