diff --git a/README.md b/README.md index addc66f6..b372fe6f 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,7 @@ five.guys(); // '🍔' ```javascript five.euro(); // '5€' five.dollar(); // '$5' +five.real(); // 'R$5' ``` diff --git a/five.js b/five.js index 90507e66..0f73eb30 100755 --- a/five.js +++ b/five.js @@ -196,6 +196,8 @@ five.dollar = function() { return '$5' }; + five.real = function() { return 'R$5' }; + five.rot = function(word) { if(typeof(word) != 'string') { return word; diff --git a/test.js b/test.js index 63ee6cc8..284d8eef 100755 --- a/test.js +++ b/test.js @@ -142,6 +142,8 @@ assert.equal('5€', five.euro()); assert.equal('$5', five.dollar()); +assert.equal('R$5', five.real()); + assert.equal('5678901234', five.rot('0123456789'), 'Numbers should be rotated'); assert.equal('fghijklmnopqrstuvwxyzabcde', five.rot('abcdefghijklmnopqrstuvwxyz'), 'Small letters should be rotated'); assert.equal('FGHIJKLMNOPQRSTUVWXYZABCDE', five.rot('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'Capital letters too');