From 7fdf5ac75cbb525f7590e43c5b16d184b221fd52 Mon Sep 17 00:00:00 2001 From: Goose Date: Mon, 19 Mar 2018 11:16:53 -0400 Subject: [PATCH 1/4] Add five.atomic() to five.js Boron is a chemical element with symbol B and atomic number 5. Produced entirely by cosmic ray spallation and supernovae and not by stellar nucleosynthesis, it is a low-abundance element in the Solar system and in the Earth's crust. --- five.js | 2 ++ 1 file changed, 2 insertions(+) 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();}; From 064181b31b801be71a5fe736f3e7887d03c87a03 Mon Sep 17 00:00:00 2001 From: Goose Date: Mon, 19 Mar 2018 11:18:05 -0400 Subject: [PATCH 2/4] Add five.atomic() to test.js Is this the scientific method? --- test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test.js b/test.js index 63ee6cc8..8b671220 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'); From cd9183d05a4a68fea12a08a3c714ec3cde03ae77 Mon Sep 17 00:00:00 2001 From: Goose Date: Mon, 19 Mar 2018 11:20:15 -0400 Subject: [PATCH 3/4] Add five.atomic() to README.md Couldn't find a place this felt like it belonged. Novel felts a little out of place. Created a "Scientific" group, as I bet there's other scientific fives out there. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) 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() // خمسة From 764d1a152072ce81c715bd8732c3dcb49bc2dfbc Mon Sep 17 00:00:00 2001 From: Goose Date: Mon, 19 Mar 2018 11:21:36 -0400 Subject: [PATCH 4/4] Fix casing typo Do not want confusion about casing. --- test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.js b/test.js index 8b671220..d20ad8a5 100755 --- a/test.js +++ b/test.js @@ -88,7 +88,7 @@ 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('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');