https://github.com/bgalek/friendly-names
Simple and lightweight library that creates friendly names using nouns and adjectives.
https://github.com/bgalek/friendly-names
adjectives nouns random slug
Last synced: 26 days ago
JSON representation
Simple and lightweight library that creates friendly names using nouns and adjectives.
- Host: GitHub
- URL: https://github.com/bgalek/friendly-names
- Owner: bgalek
- License: apache-2.0
- Created: 2020-02-20T20:17:40.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-01T04:26:31.000Z (about 1 year ago)
- Last Synced: 2024-04-14T12:52:09.420Z (about 1 year ago)
- Topics: adjectives, nouns, random, slug
- Language: Java
- Homepage:
- Size: 202 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Friendly names
> Simple and lightweight library that creates friendly names using nouns and adjectives.[](https://github.com/bgalek/friendly-names/actions/workflows/build.yml)




[](https://sonarcloud.io/dashboard?id=bgalek_friendlyname)## Usage
Add library dependency:
```groovy
compile "com.github.bgalek.utils:friendlynames:1.0.0"
```You can use this library generate user-friendly names:
```java
FriendlyNames.defaultDictionary(Locale.forLanguageTag("pl-PL")).random()honorowa-mariola
``````java
FriendlyNames.defaultDictionary().stream().limit(10).forEach(System.out::println)little-virgie
strong-rachel
military-wes
black-lenard
clear-nelia
important-hans
good-lessie
hard-roxann
real-madelaine
easy-mariela
```You can provide your own set of *nouns* and *adjectives*
```java
var dictionary = new FriendlyNamesDictionary(Set.of("noun"), Set.of("adjective"))
FriendlyNames.customDictionary(dictionary).random()noun-adjective
```## Features
- infinite stream of name combinations
- thread safe
- easy to use/extend