1293 Commits

Author SHA1 Message Date
281c675d63 Create algorithm for converting binary data to base64 2021-10-08 00:19:00 -05:00
2ae093b97c Auto-update DIRECTORY.md 2021-10-07 07:41:27 +00:00
124d2010f0 chore: merge Added Temperature Conversions to Javascript (#705)
* Added Temperature Conversions to Javascript

I added a file which contains essential conversions needed to swap temperature units to one another.
Hope you like it :)

* Update Conversions/TemperatureConversion.js

Suggestions saved

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>

* Added test file 

"test" folder was created and tests required for "TemperatureConversions" was added to it

* Fixed minor syntax errors

* Update Conversions/test/TemperatureConversion.test.js

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>

* Formatted TemperatureConversion.js 

The code was modified to comply with rules and styes recommended by the repository

* Formatted TemperatureConversion.test.js 

The code was modified to comply with rules and styes recommended by the repository

* Reformatted :) 

Hope this passes the test :)

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2021-10-07 13:10:54 +05:30
95b75e81d3 chore: merge Fix/742 migrate doctest for Vector2.js (#752)
* Migrate doctest for Vector2.js

* Remove eslint disabling for no-unused-vars since now the class is exported at the end of the file

* Group all related tests to own jest describe blocks

* Improve the doc-comment by fixing it's formatting
2021-10-07 12:39:06 +05:30
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
6eeb989930 chore: Merge pull request #750 from thisabhijeet/kadanes
added documentation, js standard style and jest testing to kadane algorithm file.
2021-10-06 17:57:29 +05:30
7c9219d4fd chore: Merge pull request #738 from charliejmoore/cycle-sort-tests
Cycle sort tests
2021-10-06 17:48:00 +05:30
ee54c7176a Auto-update DIRECTORY.md 2021-10-06 11:45:15 +00:00
586aa929c8 Fix merge conflicts 2021-10-06 07:44:41 -04:00
83b840d691 Merge branch 'master' of github.com:charliejmoore/Javascript into cycle-sort-tests 2021-10-06 07:42:16 -04:00
134641443b Merge branch 'master' of github.com:charliejmoore/Javascript into cycle-sort-tests 2021-10-06 07:41:35 -04:00
ed49e122a7 tried to fix tests 2021-10-06 15:34:08 +05:30
5a59d1efc0 changes made 2021-10-06 15:02:37 +05:30
c0fa1401c8 Merge branch 'kadanes' of https://github.com/thisabhijeet/Javascript into kadanes 2021-10-06 14:45:56 +05:30
3a8e336262 added documentation, js standard style and jest testing to kadane algorithm file. 2021-10-06 14:45:07 +05:30
6607f279ca Auto-update DIRECTORY.md 2021-10-06 09:10:09 +00:00
7be5ce0f1b chore: Merge pull request #748 from chiranjeev-thapliyal/master
added Backtracking/AllCombinationsOfSizeK
2021-10-06 14:39:39 +05:30
254f90bca1 added tests for Backtracking/AllCombinationsOfSizeK 2021-10-06 14:03:27 +05:30
2e6f8ae982 chore: Merge pull request #736 from charliejmoore/bucket-sort-tests
Bucket sort tests
2021-10-06 12:45:35 +05:30
7e419f02db chore: Merge pull request #726 from ahamed/master
 add an algorithm for checking a year is a leap year or not.
2021-10-06 12:34:22 +05:30
2534858e58 chore: Merge pull request #737 from charliejmoore/comb-sort-tests
Comb sort tests
2021-10-06 12:32:33 +05:30
5bb16d76aa updating DIRECTORY.md 2021-10-05 21:25:52 +00:00
6bb075df92 Group tests in a describe 2021-10-05 17:25:22 -04:00
9fb6884563 Merge branch 'comb-sort-tests' of github.com:charliejmoore/Javascript into comb-sort-tests 2021-10-05 17:23:52 -04:00
6bba9da118 Group tests in a describe 2021-10-05 17:23:36 -04:00
6919e85c01 added Backtracking/AllCombinationsOfSizeK 2021-10-06 00:13:25 +05:30
b23f9afa43 Auto-update DIRECTORY.md 2021-10-05 18:01:30 +00:00
82d1c2a6bd Merge branch 'master' into master 2021-10-06 00:00:47 +06:00
98d2cb7579 ♻️ rollback the package.json and the lock file 2021-10-05 23:57:48 +06:00
8f49b7894d Auto-update DIRECTORY.md 2021-10-05 13:06:02 +00:00
eaa8dc64a7 Fix merge conflicts 2021-10-05 09:05:21 -04:00
11702cc033 Merge branch 'master' of github.com:charliejmoore/Javascript into comb-sort-tests 2021-10-05 09:02:26 -04:00
801b0cd71e updating DIRECTORY.md 2021-10-05 13:00:52 +00:00
c83bc5ba6e Remove testing code in function file 2021-10-05 09:00:29 -04:00
fc07f38a0c Fix merge conflicts 2021-10-05 08:56:43 -04:00
932599d37b Remove testing code in function file 2021-10-05 08:54:13 -04:00
782386a11a Remove testing code in function file 2021-10-05 08:53:05 -04:00
7af7a1fa74 Auto-update DIRECTORY.md 2021-10-05 09:39:05 +00:00
c78bc35a06 chore: Merge pull request #727 from defaude/fix/586-build-pipeline
Proposal: Clean up CI job a bit
2021-10-05 15:08:34 +05:30
42549056b9 updating DIRECTORY.md 2021-10-05 09:33:19 +00:00
0af6c0c86b Merge pull request #732 from MrDoomy/feat/memoize-func
Feat: Added Memoize Func
2021-10-05 15:02:58 +05:30
565ce68027 Update DIRECTORY.md (manually after a rebase) 2021-10-05 11:24:26 +02:00
7bb3c80f05 Fix URL creation in directory markdown 2021-10-05 11:23:47 +02:00
6fe322bd8a Add npm ci to directory-updating job, as well (so that we can utilize globby) 2021-10-05 11:23:47 +02:00
a69d9a8c49 Clean up and speed up UpdateDirectory.js
Uses globby to find all algorithm files. This is way quicker and less error-prone than the previous implementation. Plus, it allows us to fine-tune excludes (e.g. test files and the babel config).

This also removes the need for setTimeouts which greatly speeds up the whole thing.
2021-10-05 11:23:46 +02:00
460fd57c6b Test: Drop env.CI 2021-10-05 11:23:46 +02:00
f6396f4822 Don't cat the full DIRECTORY.md file in the github job 2021-10-05 11:23:46 +02:00
21d4096446 Another proposal: Clean up "update directory" job, as well
relates to ##720

Cleaned up and updated the job description file a bit. Instead of attempting to commit every single time, we check if the DIRECTORY file actually has changes first.
2021-10-05 11:23:46 +02:00
6f9b1f127f Proposal: Clean up CI job a bit
relates to #586 and #720

Added npm scripts for doctest and style checking via standard. This allows us to call those directly via npm and not via npx.

The CI job itself is now split into distinct steps (makes it more visible which step failed).
2021-10-05 11:23:45 +02:00
90b04eadd4 updating DIRECTORY.md 2021-10-05 08:54:47 +00:00