Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ five.guys(); // '🍔'
```javascript
five.euro(); // '5€'
five.dollar(); // '$5'
five.real(); // 'R$5'
```


Expand Down
2 changes: 2 additions & 0 deletions five.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down