From 1678367efb4f0fdc2ab0855c898ddd79edc1709d Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 31 Aug 2021 12:17:59 -0500 Subject: [PATCH] Change the delimiter to an underscore when adding extra data (date or number) --- README.md | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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}` } /**