diff --git a/README.md b/README.md index addc66f6..e14add02 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,11 @@ five.mdFive() // 30056e1cab7a61d256fc8edd970d14f5 five.golden() // 1.618033988749895 ``` +##### Scientific +```javascript +five.atomic(); // 'Boron' +``` + ##### 5 goes multilingual ```javascript five.arabic() // خمسة diff --git a/five.js b/five.js index 90507e66..5c725a82 100755 --- a/five.js +++ b/five.js @@ -109,6 +109,8 @@ // returns 5*4*3*2*1 optimized at 500% normal factorial runtime; return 120; } + + five.atomic = function() { return 'Boron'; }; five.negative = function() { return -five(); }; five.loud = function (lang) { return (lang && typeof five[lang] === 'function') ? five[lang]().toUpperCase() : five.english().toUpperCase();}; diff --git a/test.js b/test.js index 63ee6cc8..d20ad8a5 100755 --- a/test.js +++ b/test.js @@ -88,6 +88,8 @@ assert.equal('5', five.hex(), 'An hexadecimal five should be 5'); assert.equal('30056e1cab7a61d256fc8edd970d14f5', five.mdFive(), 'md5 checksum of "five" should be 30056e1cab7a61d256fc8edd970d14f5'); assert.equal('1.618033988749895', five.golden(), 'A golden five is Phive'); +assert.equal('Boron', five.atomic(), 'An atomic five should be Boron'); + assert.equal('-5', five.negative(), 'A negative five should be -5'); assert.equal('FIVE', five.loud(), 'A loud five should be FIVE'); assert.equal('IVEFAY', five.loud('piglatin'), 'A loud five in Pig Latin should be IVEFAY');