124 Commits

Author SHA1 Message Date
b13b12e88c chore: merge Fix/742 migrate doctest to jest (#749)
* Remove QuickSelect doctest

There are more Jest test cases already.

* Remove AverageMedian doctest

Already migrated to jest

* Migrate doctest for BinaryExponentiationRecursive.js

(also remove inline "main" test method)

* Migrate doctest for EulersTotient.js

(also remove inline "main" test method)

* Migrate doctest for PrimeFactors.js

(also remove inline "main" test method)

* Migrate doctest for BogoSort.js

Re-write prototype-polluting helper methods, too.

(also remove inline test driver code)

* Migrate doctest for BeadSort.js

(also remove inline test driver code)

* Migrate doctest for BucketSort.js

(also remove inline test driver code)

* Migrate doctest for CocktailShakerSort.js

(also remove inline test driver code)

* Migrate doctest for MergeSort.js

(also remove inline test driver code)

* Migrate doctest for QuickSort.js

(also remove inline test driver code)

* Migrate doctest for ReverseString.js

(also remove inline test driver code)

* Migrate doctest for ReverseString.js

* Migrate doctest for ValidateEmail.js

* Migrate doctest for ConwaysGameOfLife.js

(remove the animate code, too)

* Remove TernarySearch doctest

Already migrated to jest

* Migrate doctest for BubbleSort.js

(also remove inline test driver code)

* Remove doctest from CI and from dependencies

relates to #742
fixes #586

* Migrate doctest for RgbHsvConversion.js

* Add --fix option to "standard" npm script

* Migrate doctest for BreadthFirstSearch.js

(also remove inline test driver code)

* Migrate doctest for BreadthFirstShortestPath.js

(also remove inline test driver code)

* Migrate doctest for EulerMethod.js

(also remove inline test driver code)

Move manual test-code for plotting stuff in the browser in a distinct file, too. Those "*.manual-test.js" files are excluded from the UpdateDirectory.mjs script, as well.

* Migrate doctest for Mandelbrot.js

(also remove inline test driver code & moved manual drawing test into a *.manual-test.js)

* Migrate doctest for FloodFill.js

* Migrate doctest for KochSnowflake.js

(also move manual drawing test into a *.manual-test.js)

* Update npm lockfile

* Update README and COMMITTING with a few bits & bobs regarding testing & code quality
2021-10-07 12:33:38 +05:30
1589263947 fixed some spellings 2021-10-05 12:49:23 +05:30
30d437bff9 Add max word algorithm 2021-10-03 22:08:47 +07:00
3f6b4c1d72 added new line 2021-10-03 17:31:45 +05:30
c198a9f53d Added test for ScrambleStrings and formatted folder structure for other folders 2021-10-03 17:28:17 +05:30
37b2cebe22 Merge pull request #715 from Koddi-Evangelista/master
feat: add scramble string algorithm
2021-10-03 17:09:12 +05:30
2ecee85012 chore: merge "Add test for camel case algorithm" (#710)
* fix: change function name and use ES6 export

* feat: add tests for camel case

Co-authored-by: Alexandre VU <alexandre.vu@montreal.ca>
2021-10-03 14:03:07 +05:30
9d996e1898 feat: add scramble string algorithm 2021-10-03 10:09:57 +08:00
b03a1b8bbe chore: merge "Add tests for snake case algorithm" (#708)
* feat: adjust function name and use ES6 export

* feat: add test for SnakeCase

Co-authored-by: Alexandre VU <alexandre.vu@montreal.ca>
2021-10-02 13:35:43 +05:30
8c2f2ca15a chore: merge "Dice" (#703)
* feat: add dice coefficient

* chore: link to wikipedia article

* chore: convert to esm

* refactor: add tests

* chore: formatting
2021-10-01 13:57:07 +05:30
19970c35b9 chore: merge "Tests check anagrams (#693)"
* add test cases for checkAnagram function to cover additional inputs and edge cases

* adjust spacing between tests to be more consistent with other files

* update CheckAnagram to return boolean value instead of string

* add a reference link and definition of Anagram to CheckAnagram documentation
2021-09-23 11:29:55 +05:30
3c90d5db7a chore: merge "Tests check vowels (#691)"
* add tests to CheckVowels to cover additional inputs and edge cases

* make line spacing consistent with other test files
2021-09-20 12:55:02 +05:30
e40c62ddd8 chore: merge Tests for check flat case (#689)
* update function documentation and name to match js convention

* add additional documentation explaining what the function does

* add tests for checkFlatCase function

* fix standard.js errors
2021-09-19 12:15:47 +05:30
6e2506be9e replace _ to - 2021-08-20 21:49:22 +05:30
82e7ede99a add CheckKebabCase method 2021-08-20 21:45:35 +05:30
eea8ab3df3 add CheckSnakeCase method 2021-08-20 21:26:26 +05:30
2b28ed716d add CheckFlatCase method 2021-08-20 21:13:50 +05:30
0ea955b06c re-formatted CheckPascalCase by standard.js after updating error. 2021-08-20 13:25:38 +05:30
8ef1677f81 re-formatted CheckCamelCalse by standard.js after updating error. 2021-08-20 13:24:27 +05:30
cddfc342b7 Update String/CheckPascalCase.js
Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2021-08-20 13:17:59 +05:30
8722d52980 Update String/CheckCamelCase.js
Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2021-08-20 13:17:48 +05:30
e48f5e2192 add CheckPascalCase method 2021-08-20 01:18:47 +05:30
77c3a9eac8 add CheckCamelCase method 2021-08-20 01:12:34 +05:30
ae74e6b20b reformatted the code with the standard.js code style 2021-08-19 00:04:32 +05:30
713ab61985 add problem source and explanation reference 2021-08-18 20:25:27 +05:30
fd71eff8bf re-formate the code 2021-08-18 17:51:12 +05:30
29fee5fbce add new line at the end of the file 2021-08-18 17:45:03 +05:30
6893c4f310 add AlternativeStringArrange method in string category 2021-08-18 17:44:02 +05:30
7af96ae1cc Added HammingDistance.js and HammingDistance.test.js in String directory 2021-07-11 16:30:23 +05:30
b77c0a18e2 fix(LevenshteinDistance.test.js): Fixed broken test 2021-05-21 12:52:06 +05:30
7992caa54f feat(PermutateString.js): Array.prototype.map() -> Array.prototype.forEach() 2021-05-21 12:35:12 +05:30
9f24341b5b Added test script for CreatePermutations and file name change 2021-05-06 21:08:47 +05:30
4bc2b28b7e #559 Improve Palindrome check
* #559

* #559

* #559

* #559

Co-authored-by: LOkesh <lpatil@rewardhealth.com>
2021-02-17 01:48:00 +05:30
71192ab109 Merge pull request #532 from Khez/string-validate-email
#142 #461 Adding Doctests to String/ValidateEmail.js
2021-01-22 08:18:29 +05:30
d8395e7c9f Merge pull request #533 from Khez/string-reverse-words
#142 #461 Adding Doctests to String/ReverseWords.js
2021-01-20 20:41:24 +05:30
9386c29fdf Merge pull request #534 from Khez/string-reverse-string
#142 #461 Adding Doctests to String/ReverseString.js
2021-01-20 20:40:49 +05:30
291f7b1a23 Apply JS standard rules on KMPPatternSearching.js 2020-10-30 23:04:21 +05:30
2c5aaa3690 Add KMP string searching algorithm 2020-10-30 23:01:06 +05:30
6bc638b34e StandardJS Checks require space after function name 2020-10-30 18:28:29 +02:00
84e4c9906b #142 #461 Adding Doctests to String/ReverseString.js 2020-10-30 18:24:34 +02:00
50091d299f #142 #461 Adding Doctests to String/ReverseWords.js 2020-10-30 18:17:57 +02:00
09d38fe959 #142 #461 Adding Doctests to String/ValidateEmail.js 2020-10-30 18:11:51 +02:00
a57323b5d9 Modify ValidateEmail.js to accept all suffixes 2020-10-19 20:16:04 +03:00
26f57adcf7 Merge pull request #496 from Mozartuss/master
Add generateUUID.js
2020-10-19 09:45:49 +05:30
f455cc3b09 Only Node.js version (delete crypto version (Browser)) 2020-10-18 19:37:10 +02:00
b651e544f0 add generateUUID.js 2020-10-18 01:15:07 +02:00
54198ac314 Added check pangram algorithm 2020-10-16 15:01:39 +05:00
4a26347767 Added check pangram algorithm 2020-10-16 14:50:14 +05:00
7b2c305931 Merge pull request #403 from rubiin/master
Added createPermutation function
2020-10-15 19:02:31 +05:30
90c4900cca Update createPurmutations.js 2020-10-15 16:39:00 +05:45