Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-01T04:26:31.000Z (8 months ago)
- Last Synced: 2024-04-14T12:52:09.420Z (7 months 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.![GitHub Workflow Status](https://img.shields.io/github/workflow/status/bgalek/friendly-names/Build?style=flat-square)
![Codecov](https://img.shields.io/codecov/c/github/bgalek/friendly-names.svg?style=flat-square)
![GitHub Release Date](https://img.shields.io/github/release-date/bgalek/friendly-names.svg?style=flat-square)
![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/bgalek/friendly-names.svg?style=flat-square)
![Scrutinizer code quality](https://img.shields.io/scrutinizer/g/bgalek/friendly-names.svg?style=flat-square)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bgalek_friendly-names&metric=alert_status)](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