From ccd2959d72e70b74c7faf755bb690da35e3c48a6 Mon Sep 17 00:00:00 2001 From: Wing Leung Date: Wed, 25 May 2022 18:07:30 +0100 Subject: feat: add music.songName (#996) Co-authored-by: Wing Leung Choi --- src/modules/music/index.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/modules') diff --git a/src/modules/music/index.ts b/src/modules/music/index.ts index a34a4bb8..ba051524 100644 --- a/src/modules/music/index.ts +++ b/src/modules/music/index.ts @@ -23,4 +23,16 @@ export class Music { genre(): string { return this.faker.helpers.arrayElement(this.faker.definitions.music.genre); } + + /** + * Returns a random song name. + * + * @example + * faker.music.songName() // 'White Christmas' + */ + songName(): string { + return this.faker.helpers.arrayElement( + this.faker.definitions.music.song_name + ); + } } -- cgit v1.2.3