Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-19T22:55:06.000Z (over 3 years ago)
- Last Synced: 2024-10-14T15:47:42.838Z (3 months ago)
- Topics: go, golang, hacktoberfest
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- 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://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](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)