Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)