From 6f74f8e75d5e5c2a4082a457e8f9febac8b25de7 Mon Sep 17 00:00:00 2001 From: Paul Wayper Date: Wed, 13 Aug 2025 10:20:17 +1000 Subject: [PATCH] Adding Beethoven's 5th symphony Signed-off-by: Paul Wayper --- five.js | 16 ++++++++++------ test.js | 2 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/five.js b/five.js index 90507e66..ba8767f5 100755 --- a/five.js +++ b/five.js @@ -147,7 +147,7 @@ five.jackson = function() { return ['Jackie','Tito','Jermaine','Marlon','Michael']; }; - + five.members = function() { return ['Sean Conlon', 'Ritchie Neville', 'Scott Robinson', 'Jason \'J\' Brown', 'Abz Love']; }; @@ -159,7 +159,7 @@ five.singles = function() { return ['Slam Dunk (Da Funk)', 'When the Lights Go Out', 'Got the Feelin\'', 'Everybody Get Up', 'It\'s the Things You Do', 'Until the Time Is Through', 'If Ya Gettin\' Down', 'Keep On Movin\'', 'Don\'t Wanna Let You Go', 'We Will Rock You', 'Let\'s Dance', 'Closer to Me', 'Rock the Party', 'I Wish It Could Be Christmas Everyday']; } - + five.fiveFiveFive = function() { return 'Interstella 5555: The 5tory of the 5ecret 5tar 5ystem'; } @@ -184,6 +184,10 @@ return five() + " bad boys with the power to rock you" } + five.beethoven = function() { + return "Dun dun dun DUUUNNNNN!"; + }; + five.async = function(callback) { process.nextTick(function() { callback(null, five()); @@ -191,9 +195,9 @@ }; five.r = function () { return '£5'; }; - + five.euro = function() { return '5€' }; - + five.dollar = function() { return '$5' }; five.rot = function(word) { @@ -213,11 +217,11 @@ }; five.oclock = function() { return '🕔'; }; - + five.oclockSomewhere = function() { return '🍺'; }; five.guys = function() { return '🍔'; }; - + five.bucks = function() { return '$' + five() + '.00'; }; five.valueOf = five; diff --git a/test.js b/test.js index 63ee6cc8..586002d5 100755 --- a/test.js +++ b/test.js @@ -129,6 +129,8 @@ assert.equal(five.luniz(), 'I Got 5 on It', 'A Luniz five should be the song tit assert.equal(five.funk(), '5 bad boys with the power to rock you', 'A funked five should be a group of bad boys with the power to rock you'); +assert.equal(five.beethoven(), 'Dun dun dun DUUUNNNNN!', "Beethoven's fifth symphony starts with four famous notes (ironic!)"); + assert.equal(true, five.isFive(five())); assert.equal(false, five.isFive(10));