mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 02:05:08 +08:00
fix: spellings which are making ci fail (#1089)
* Updated Documentation in README.md * chore: remove wrong spelling * ci: recognize "falsy" as correct spelling * chore: fix spelling Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
2
.github/workflows/Ci.yml
vendored
2
.github/workflows/Ci.yml
vendored
@ -35,4 +35,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
# file types to ignore
|
# file types to ignore
|
||||||
skip: "*.json,*.yml,DIRECTORY.md"
|
skip: "*.json,*.yml,DIRECTORY.md"
|
||||||
ignore_words_list: "ba,esy,yse"
|
ignore_words_list: "ba,esy,yse,falsy"
|
||||||
|
@ -170,6 +170,7 @@
|
|||||||
* [IsEven](Maths/IsEven.js)
|
* [IsEven](Maths/IsEven.js)
|
||||||
* [IsOdd](Maths/IsOdd.js)
|
* [IsOdd](Maths/IsOdd.js)
|
||||||
* [IsPronic](Maths/IsPronic.js)
|
* [IsPronic](Maths/IsPronic.js)
|
||||||
|
* [JugglerSequence](Maths/JugglerSequence.js)
|
||||||
* [LeapYear](Maths/LeapYear.js)
|
* [LeapYear](Maths/LeapYear.js)
|
||||||
* [LinearSieve](Maths/LinearSieve.js)
|
* [LinearSieve](Maths/LinearSieve.js)
|
||||||
* [LucasSeries](Maths/LucasSeries.js)
|
* [LucasSeries](Maths/LucasSeries.js)
|
||||||
|
@ -13,7 +13,7 @@ const piEstimation = (iterations = 100000) => {
|
|||||||
if (radius < 1) circleCounter += 1
|
if (radius < 1) circleCounter += 1
|
||||||
}
|
}
|
||||||
|
|
||||||
// fomula for pi = (ratio of number inside circle and total iteration) x 4
|
// formula for pi = (ratio of number inside circle and total iteration) x 4
|
||||||
const pi = (circleCounter / iterations) * 4
|
const pi = (circleCounter / iterations) * 4
|
||||||
return pi
|
return pi
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ const checkAnagramRegex = (str1, str2) => {
|
|||||||
/**
|
/**
|
||||||
* str1 converted to an array and traverse each letter of str1 by reduce method
|
* str1 converted to an array and traverse each letter of str1 by reduce method
|
||||||
* reduce method return string which is empty or not.
|
* reduce method return string which is empty or not.
|
||||||
* if it returns empty string '' -> falsy, with Logical !(NOT) Operator, it's will be converted to boolean and return true else false
|
|
||||||
*/
|
*/
|
||||||
return ![...str1].reduce(
|
return ![...str1].reduce(
|
||||||
(str2Acc, cur) => str2Acc.replace(new RegExp(cur, 'i'), ''), // remove the similar letter from str2Acc in case-insensitive
|
(str2Acc, cur) => str2Acc.replace(new RegExp(cur, 'i'), ''), // remove the similar letter from str2Acc in case-insensitive
|
||||||
|
Reference in New Issue
Block a user