1
0
Fork 0
mirror of https://github.com/MillironX/docker-names.git synced 2024-11-14 21:43:10 +00:00

Change the delimiter to an underscore when adding extra data (date or number)

This commit is contained in:
Thomas A. Christensen II 2021-08-31 12:17:59 -05:00
parent 95d7587408
commit 1678367efb
Signed by: millironx
GPG key ID: 139C07724802BC5D
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ An implementation of [docker-names](https://github.com/moby/moby/blob/master/pkg
- animal breeding
- rumen science
- among others...
2. Changed the delimiter back to an underscore
2. Changed the delimiter to an underscore when adding extra data (date or number)
3. Added an identifier that starts with a date (useful where identifiers have to be sorted chronologically).
## Usage

View file

@ -964,7 +964,7 @@ export const right = [
export function generateName(): string {
const leftElement = left[Math.floor(Math.random() * left.length)];
const rightElement = right[Math.floor(Math.random() * right.length)];
return `${leftElement}_${rightElement}`
return `${leftElement}-${rightElement}`
}
/**