NobGit
public imalexnord read

Slot

Calendar-first scheduling powered by Cloudflare Workers and Google Calendar.

Languages

Repository composition by tracked source files.

TypeScript
TypeScript 79% CSS 19% SQL 2% HTML 0%
Create file Wiki Documentation
Clone
https://nobgit.com/user/imalexnord/slot.git
ssh://[email protected]:2222/user/imalexnord/slot.git

Trace

worker/money.ts

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

money.ts on main
Author Date Commit Line Code
Alex Nord 1 day ago 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
1
const ZERO_DECIMAL_CURRENCIES = new Set([
Open commit View diff
1 const ZERO_DECIMAL_CURRENCIES = new Set([
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
2
  'bif', 'clp', 'djf', 'gnf', 'jpy', 'kmf', 'krw', 'mga', 'pyg', 'rwf', 'ugx', 'vnd', 'vuv', 'xaf', 'xof', 'xpf',
Open commit View diff
2 'bif', 'clp', 'djf', 'gnf', 'jpy', 'kmf', 'krw', 'mga', 'pyg', 'rwf', 'ugx', 'vnd', 'vuv', 'xaf', 'xof', 'xpf',
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
3
]);
Open commit View diff
3 ]);
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
4
Open commit View diff
4
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
5
const THREE_DECIMAL_CURRENCIES = new Set(['bhd', 'jod', 'kwd', 'omr', 'tnd']);
Open commit View diff
5 const THREE_DECIMAL_CURRENCIES = new Set(['bhd', 'jod', 'kwd', 'omr', 'tnd']);
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
6
Open commit View diff
6
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
7
export function currencyMinorUnitDigits(currency: string): number {
Open commit View diff
7 export function currencyMinorUnitDigits(currency: string): number {
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
8
  const normalized = currency.trim().toLowerCase();
Open commit View diff
8 const normalized = currency.trim().toLowerCase();
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
9
  if (ZERO_DECIMAL_CURRENCIES.has(normalized)) return 0;
Open commit View diff
9 if (ZERO_DECIMAL_CURRENCIES.has(normalized)) return 0;
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
10
  if (THREE_DECIMAL_CURRENCIES.has(normalized)) return 3;
Open commit View diff
10 if (THREE_DECIMAL_CURRENCIES.has(normalized)) return 3;
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
11
  return 2;
Open commit View diff
11 return 2;
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
12
}
Open commit View diff
12 }
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
13
Open commit View diff
13
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
14
export function majorToMinor(amountMajor: number, currency: string): number {
Open commit View diff
14 export function majorToMinor(amountMajor: number, currency: string): number {
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
15
  if (!Number.isFinite(amountMajor) || amountMajor < 0) return 0;
Open commit View diff
15 if (!Number.isFinite(amountMajor) || amountMajor < 0) return 0;
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
16
  return Math.round(amountMajor * (10 ** currencyMinorUnitDigits(currency)));
Open commit View diff
16 return Math.round(amountMajor * (10 ** currencyMinorUnitDigits(currency)));
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
17
}
Open commit View diff
17 }
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
18
Open commit View diff
18
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
19
export function minorToMajor(amountMinor: number, currency: string): number {
Open commit View diff
19 export function minorToMajor(amountMinor: number, currency: string): number {
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
20
  if (!Number.isFinite(amountMinor)) return 0;
Open commit View diff
20 if (!Number.isFinite(amountMinor)) return 0;
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
21
  return amountMinor / (10 ** currencyMinorUnitDigits(currency));
Open commit View diff
21 return amountMinor / (10 ** currencyMinorUnitDigits(currency));
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
22
}
Open commit View diff
22 }
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
23
Open commit View diff
23
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
24
export function bookingAmountMinor(ratePerMinute: number, durationMinutes: number, currency: string): number {
Open commit View diff
24 export function bookingAmountMinor(ratePerMinute: number, durationMinutes: number, currency: string): number {
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
25
  return majorToMinor(ratePerMinute * durationMinutes, currency);
Open commit View diff
25 return majorToMinor(ratePerMinute * durationMinutes, currency);
same change 110f91e

Adding indication for test/live key

Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48
Author
Alex Nord <[email protected]>
Date
1 day ago
Selected line
26
}
Open commit View diff
26 }