Skip to content

Commit e862810

Browse files
committed
♻️ Update
1 parent c43cd97 commit e862810

23 files changed

+108
-62
lines changed

β€Žmod.tsβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
export * from "./src/browser/mod.ts";
2-
export * from "./src/language/mod.ts";
3-
export * from "./src/node/mod.ts";
1+
export * from "./src/program_structure/mod.ts";
2+
export * from "./src/functions/mod.ts";

β€Žreadme.mdβ€Ž

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ I solved the exercises using [TypeScript](https://typescriptlang.org) and
2020
[Solution](https://github.com/UltiRequiem/eloquent-javascript/blob/main/src/language/fizzbuzz.ts) -
2121
[Test](https://github.com/UltiRequiem/eloquent-javascript/blob/main/src/language/fizzbuzz.test.ts)
2222

23-
> Returns the result as an array instead of printing it to the console for
24-
> reusability 🧐
25-
2623
- [Chessboard](https://eloquentjavascript.net/02_program_structure.html#i_swb9JBtSQQ) -
2724
[Solution](https://github.com/UltiRequiem/eloquent-javascript/blob/main/src/language/chessboard.ts) -
2825
[Test](https://github.com/UltiRequiem/eloquent-javascript/blob/main/src/language/chessboard.test.ts)
File renamed without changes.

β€Žsrc/language/bean_counting.tsβ€Ž renamed to β€Žsrc/functions/bean_counting.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function countChar(text: string, charToSearch: string) {
2-
const occurences = [...text].filter((letter) => letter === charToSearch);
3-
return occurences.length;
2+
const { length } = [...text].filter((letter) => letter === charToSearch);
3+
return length;
44
}
55

66
export function counterOcurrencesCreator(charToSearch: string) {
File renamed without changes.

β€Žsrc/language/is_even.tsβ€Ž renamed to β€Žsrc/functions/is_even.tsβ€Ž

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ export function isEven(numberToTest: number) {
66
function isEvenCore(coreNumber: number): boolean {
77
if (coreNumber === 0) {
88
return true;
9-
}
10-
11-
if (coreNumber === 1) {
9+
} else if (coreNumber === 1) {
1210
return false;
1311
}
1412

File renamed without changes.
File renamed without changes.

β€Žsrc/functions/mod.tsβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from "./minimum.ts";
2+
export * from "./is_even.ts";
3+
export * from "./bean_counting.ts";

0 commit comments

Comments
Β (0)