diff --git a/README.md b/README.md index a5de8b0..9de33c2 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/index.ts b/src/index.ts index c6114bf..2e31ab8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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}` } /**