From 61f38bf60cedaf210ddd067c624a086e0f2c7a71 Mon Sep 17 00:00:00 2001 From: Benjo Kho Date: Sat, 7 Aug 2021 14:52:11 +0800 Subject: [PATCH] Rename folders with numbers and underscores --- {01 helloWorld => 01_helloWorld}/README.md | 0 {01 helloWorld => 01_helloWorld}/helloWorld.js | 0 {01 helloWorld => 01_helloWorld}/helloWorld.spec.js | 0 {02 repeatString => 02_repeatString}/README.md | 0 {02 repeatString => 02_repeatString}/repeatString.js | 0 {02 repeatString => 02_repeatString}/repeatString.spec.js | 0 03 reverseString/reverseString.js | 5 ----- {03 reverseString => 03_reverseString}/README.md | 0 03_reverseString/reverseString.js | 5 +++++ .../reverseString.spec.js | 6 +++--- {04 removeFromArray => 04_removeFromArray}/README.md | 0 .../removeFromArray.js | 0 .../removeFromArray.spec.js | 0 {05 sumAll => 05_sumAll}/README.md | 0 {05 sumAll => 05_sumAll}/sumAll.js | 0 {05 sumAll => 05_sumAll}/sumAll.spec.js | 0 {06 leapYears => 06_leapYears}/README.md | 0 {06 leapYears => 06_leapYears}/leapYears.js | 0 {06 leapYears => 06_leapYears}/leapYears.spec.js | 0 {07 tempConversion => 07_tempConversion}/README.md | 0 {07 tempConversion => 07_tempConversion}/tempConversion.js | 0 .../tempConversion.spec.js | 0 {08 calculator => 08_calculator}/README.md | 0 {08 calculator => 08_calculator}/calculator.js | 0 {08 calculator => 08_calculator}/calculator.spec.js | 0 {09 palindromes => 09_palindromes}/README.md | 0 {09 palindromes => 09_palindromes}/palindromes.js | 0 {09 palindromes => 09_palindromes}/palindromes.spec.js | 0 {10 fibonacci => 10_fibonacci}/README.md | 0 {10 fibonacci => 10_fibonacci}/fibonacci.js | 0 {10 fibonacci => 10_fibonacci}/fibonacci.spec.js | 0 {11 getTheTitles => 11_getTheTitles}/README.md | 0 {11 getTheTitles => 11_getTheTitles}/getTheTitles.js | 0 {11 getTheTitles => 11_getTheTitles}/getTheTitles.spec.js | 0 {12 findTheOldest => 12_findTheOldest}/README.md | 0 {12 findTheOldest => 12_findTheOldest}/findTheOldest.js | 0 .../findTheOldest.spec.js | 0 {13 caesar => 13_caesar}/README.md | 0 {13 caesar => 13_caesar}/caesar.js | 0 {13 caesar => 13_caesar}/caesar.spec.js | 0 40 files changed, 8 insertions(+), 8 deletions(-) rename {01 helloWorld => 01_helloWorld}/README.md (100%) rename {01 helloWorld => 01_helloWorld}/helloWorld.js (100%) rename {01 helloWorld => 01_helloWorld}/helloWorld.spec.js (100%) rename {02 repeatString => 02_repeatString}/README.md (100%) rename {02 repeatString => 02_repeatString}/repeatString.js (100%) rename {02 repeatString => 02_repeatString}/repeatString.spec.js (100%) delete mode 100644 03 reverseString/reverseString.js rename {03 reverseString => 03_reverseString}/README.md (100%) create mode 100644 03_reverseString/reverseString.js rename {03 reverseString => 03_reverseString}/reverseString.spec.js (70%) rename {04 removeFromArray => 04_removeFromArray}/README.md (100%) rename {04 removeFromArray => 04_removeFromArray}/removeFromArray.js (100%) rename {04 removeFromArray => 04_removeFromArray}/removeFromArray.spec.js (100%) rename {05 sumAll => 05_sumAll}/README.md (100%) rename {05 sumAll => 05_sumAll}/sumAll.js (100%) rename {05 sumAll => 05_sumAll}/sumAll.spec.js (100%) rename {06 leapYears => 06_leapYears}/README.md (100%) rename {06 leapYears => 06_leapYears}/leapYears.js (100%) rename {06 leapYears => 06_leapYears}/leapYears.spec.js (100%) rename {07 tempConversion => 07_tempConversion}/README.md (100%) rename {07 tempConversion => 07_tempConversion}/tempConversion.js (100%) rename {07 tempConversion => 07_tempConversion}/tempConversion.spec.js (100%) rename {08 calculator => 08_calculator}/README.md (100%) rename {08 calculator => 08_calculator}/calculator.js (100%) rename {08 calculator => 08_calculator}/calculator.spec.js (100%) rename {09 palindromes => 09_palindromes}/README.md (100%) rename {09 palindromes => 09_palindromes}/palindromes.js (100%) rename {09 palindromes => 09_palindromes}/palindromes.spec.js (100%) rename {10 fibonacci => 10_fibonacci}/README.md (100%) rename {10 fibonacci => 10_fibonacci}/fibonacci.js (100%) rename {10 fibonacci => 10_fibonacci}/fibonacci.spec.js (100%) rename {11 getTheTitles => 11_getTheTitles}/README.md (100%) rename {11 getTheTitles => 11_getTheTitles}/getTheTitles.js (100%) rename {11 getTheTitles => 11_getTheTitles}/getTheTitles.spec.js (100%) rename {12 findTheOldest => 12_findTheOldest}/README.md (100%) rename {12 findTheOldest => 12_findTheOldest}/findTheOldest.js (100%) rename {12 findTheOldest => 12_findTheOldest}/findTheOldest.spec.js (100%) rename {13 caesar => 13_caesar}/README.md (100%) rename {13 caesar => 13_caesar}/caesar.js (100%) rename {13 caesar => 13_caesar}/caesar.spec.js (100%) diff --git a/01 helloWorld/README.md b/01_helloWorld/README.md similarity index 100% rename from 01 helloWorld/README.md rename to 01_helloWorld/README.md diff --git a/01 helloWorld/helloWorld.js b/01_helloWorld/helloWorld.js similarity index 100% rename from 01 helloWorld/helloWorld.js rename to 01_helloWorld/helloWorld.js diff --git a/01 helloWorld/helloWorld.spec.js b/01_helloWorld/helloWorld.spec.js similarity index 100% rename from 01 helloWorld/helloWorld.spec.js rename to 01_helloWorld/helloWorld.spec.js diff --git a/02 repeatString/README.md b/02_repeatString/README.md similarity index 100% rename from 02 repeatString/README.md rename to 02_repeatString/README.md diff --git a/02 repeatString/repeatString.js b/02_repeatString/repeatString.js similarity index 100% rename from 02 repeatString/repeatString.js rename to 02_repeatString/repeatString.js diff --git a/02 repeatString/repeatString.spec.js b/02_repeatString/repeatString.spec.js similarity index 100% rename from 02 repeatString/repeatString.spec.js rename to 02_repeatString/repeatString.spec.js diff --git a/03 reverseString/reverseString.js b/03 reverseString/reverseString.js deleted file mode 100644 index c5ebf91..0000000 --- a/03 reverseString/reverseString.js +++ /dev/null @@ -1,5 +0,0 @@ -const reverseString = function() { - -}; - -module.exports = reverseString; diff --git a/03 reverseString/README.md b/03_reverseString/README.md similarity index 100% rename from 03 reverseString/README.md rename to 03_reverseString/README.md diff --git a/03_reverseString/reverseString.js b/03_reverseString/reverseString.js new file mode 100644 index 0000000..ad79ce0 --- /dev/null +++ b/03_reverseString/reverseString.js @@ -0,0 +1,5 @@ +const reverseString = function(str) { + let newStr = str.split("").reverse().join(""); +}; + +module.exports = reverseString; diff --git a/03 reverseString/reverseString.spec.js b/03_reverseString/reverseString.spec.js similarity index 70% rename from 03 reverseString/reverseString.spec.js rename to 03_reverseString/reverseString.spec.js index 8adb887..b51c50e 100644 --- a/03 reverseString/reverseString.spec.js +++ b/03_reverseString/reverseString.spec.js @@ -5,14 +5,14 @@ describe('reverseString', () => { expect(reverseString('hello')).toEqual('olleh'); }); - test.skip('reverses multiple words', () => { + test('reverses multiple words', () => { expect(reverseString('hello there')).toEqual('ereht olleh') }) - test.skip('works with numbers and punctuation', () => { + test('works with numbers and punctuation', () => { expect(reverseString('123! abc!')).toEqual('!cba !321') }) - test.skip('works with blank strings', () => { + test('works with blank strings', () => { expect(reverseString('')).toEqual('') }) }); diff --git a/04 removeFromArray/README.md b/04_removeFromArray/README.md similarity index 100% rename from 04 removeFromArray/README.md rename to 04_removeFromArray/README.md diff --git a/04 removeFromArray/removeFromArray.js b/04_removeFromArray/removeFromArray.js similarity index 100% rename from 04 removeFromArray/removeFromArray.js rename to 04_removeFromArray/removeFromArray.js diff --git a/04 removeFromArray/removeFromArray.spec.js b/04_removeFromArray/removeFromArray.spec.js similarity index 100% rename from 04 removeFromArray/removeFromArray.spec.js rename to 04_removeFromArray/removeFromArray.spec.js diff --git a/05 sumAll/README.md b/05_sumAll/README.md similarity index 100% rename from 05 sumAll/README.md rename to 05_sumAll/README.md diff --git a/05 sumAll/sumAll.js b/05_sumAll/sumAll.js similarity index 100% rename from 05 sumAll/sumAll.js rename to 05_sumAll/sumAll.js diff --git a/05 sumAll/sumAll.spec.js b/05_sumAll/sumAll.spec.js similarity index 100% rename from 05 sumAll/sumAll.spec.js rename to 05_sumAll/sumAll.spec.js diff --git a/06 leapYears/README.md b/06_leapYears/README.md similarity index 100% rename from 06 leapYears/README.md rename to 06_leapYears/README.md diff --git a/06 leapYears/leapYears.js b/06_leapYears/leapYears.js similarity index 100% rename from 06 leapYears/leapYears.js rename to 06_leapYears/leapYears.js diff --git a/06 leapYears/leapYears.spec.js b/06_leapYears/leapYears.spec.js similarity index 100% rename from 06 leapYears/leapYears.spec.js rename to 06_leapYears/leapYears.spec.js diff --git a/07 tempConversion/README.md b/07_tempConversion/README.md similarity index 100% rename from 07 tempConversion/README.md rename to 07_tempConversion/README.md diff --git a/07 tempConversion/tempConversion.js b/07_tempConversion/tempConversion.js similarity index 100% rename from 07 tempConversion/tempConversion.js rename to 07_tempConversion/tempConversion.js diff --git a/07 tempConversion/tempConversion.spec.js b/07_tempConversion/tempConversion.spec.js similarity index 100% rename from 07 tempConversion/tempConversion.spec.js rename to 07_tempConversion/tempConversion.spec.js diff --git a/08 calculator/README.md b/08_calculator/README.md similarity index 100% rename from 08 calculator/README.md rename to 08_calculator/README.md diff --git a/08 calculator/calculator.js b/08_calculator/calculator.js similarity index 100% rename from 08 calculator/calculator.js rename to 08_calculator/calculator.js diff --git a/08 calculator/calculator.spec.js b/08_calculator/calculator.spec.js similarity index 100% rename from 08 calculator/calculator.spec.js rename to 08_calculator/calculator.spec.js diff --git a/09 palindromes/README.md b/09_palindromes/README.md similarity index 100% rename from 09 palindromes/README.md rename to 09_palindromes/README.md diff --git a/09 palindromes/palindromes.js b/09_palindromes/palindromes.js similarity index 100% rename from 09 palindromes/palindromes.js rename to 09_palindromes/palindromes.js diff --git a/09 palindromes/palindromes.spec.js b/09_palindromes/palindromes.spec.js similarity index 100% rename from 09 palindromes/palindromes.spec.js rename to 09_palindromes/palindromes.spec.js diff --git a/10 fibonacci/README.md b/10_fibonacci/README.md similarity index 100% rename from 10 fibonacci/README.md rename to 10_fibonacci/README.md diff --git a/10 fibonacci/fibonacci.js b/10_fibonacci/fibonacci.js similarity index 100% rename from 10 fibonacci/fibonacci.js rename to 10_fibonacci/fibonacci.js diff --git a/10 fibonacci/fibonacci.spec.js b/10_fibonacci/fibonacci.spec.js similarity index 100% rename from 10 fibonacci/fibonacci.spec.js rename to 10_fibonacci/fibonacci.spec.js diff --git a/11 getTheTitles/README.md b/11_getTheTitles/README.md similarity index 100% rename from 11 getTheTitles/README.md rename to 11_getTheTitles/README.md diff --git a/11 getTheTitles/getTheTitles.js b/11_getTheTitles/getTheTitles.js similarity index 100% rename from 11 getTheTitles/getTheTitles.js rename to 11_getTheTitles/getTheTitles.js diff --git a/11 getTheTitles/getTheTitles.spec.js b/11_getTheTitles/getTheTitles.spec.js similarity index 100% rename from 11 getTheTitles/getTheTitles.spec.js rename to 11_getTheTitles/getTheTitles.spec.js diff --git a/12 findTheOldest/README.md b/12_findTheOldest/README.md similarity index 100% rename from 12 findTheOldest/README.md rename to 12_findTheOldest/README.md diff --git a/12 findTheOldest/findTheOldest.js b/12_findTheOldest/findTheOldest.js similarity index 100% rename from 12 findTheOldest/findTheOldest.js rename to 12_findTheOldest/findTheOldest.js diff --git a/12 findTheOldest/findTheOldest.spec.js b/12_findTheOldest/findTheOldest.spec.js similarity index 100% rename from 12 findTheOldest/findTheOldest.spec.js rename to 12_findTheOldest/findTheOldest.spec.js diff --git a/13 caesar/README.md b/13_caesar/README.md similarity index 100% rename from 13 caesar/README.md rename to 13_caesar/README.md diff --git a/13 caesar/caesar.js b/13_caesar/caesar.js similarity index 100% rename from 13 caesar/caesar.js rename to 13_caesar/caesar.js diff --git a/13 caesar/caesar.spec.js b/13_caesar/caesar.spec.js similarity index 100% rename from 13 caesar/caesar.spec.js rename to 13_caesar/caesar.spec.js