mirror of
https://github.com/MillironX/docker-names.git
synced 2024-11-15 05:53:10 +00:00
Change dash back to underscore
This commit is contained in:
parent
fa5c207540
commit
29c2344622
2 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Docker Names
|
# Docker Names
|
||||||
|
|
||||||
An implementation of [docker-names](https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go) in TypeScript. This package unlike the normal docker name generator, generates with a `-` instead of an `_`.
|
An implementation of [docker-names](https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go) in TypeScript.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
@ -856,7 +856,7 @@ export const right = [
|
||||||
export function generateName(): string {
|
export function generateName(): string {
|
||||||
const leftElement = left[Math.floor(Math.random() * left.length)];
|
const leftElement = left[Math.floor(Math.random() * left.length)];
|
||||||
const rightElement = right[Math.floor(Math.random() * right.length)];
|
const rightElement = right[Math.floor(Math.random() * right.length)];
|
||||||
return `${leftElement}-${rightElement}`
|
return `${leftElement}_${rightElement}`
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -864,5 +864,5 @@ export function generateName(): string {
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export function generateNameWithNumber() {
|
export function generateNameWithNumber() {
|
||||||
return `${generateName()}-${Math.floor(Math.random() * 6) + 1}`
|
return `${generateName()}_${Math.floor(Math.random() * 6) + 1}`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue