event-attendance
·158 words·1 min
event-attendance #
Match provided email on an application with ones who filled out an event attendance form
Install Deno #
https://docs.deno.com/runtime/getting_started/installation/
Usage #
deno run -A main.ts --event_path=<event.csv> --applications_path=<app.csv>
About #
For this project, I used TypeScript and the Deno runtime
Testing #
deno test
What did I learn from this project? #
- “top-level async” is when you have an async in main
- Using the
.split()
method is the same as Python - You can
.pop()
an array, and it’ll remove the last item like in Rust - Using a
forEach
is useful - All async functions return a
Promise<Type>
- You need to
--allow-read={filename}
to allow reads to files - You can use
assertThrows
to test if a function correctly throws and Error - Use slice to get a piece of an array like you would with
[i:j]
in Python - Sets can contain strings but you need to create them with new
Set<string>([]);
- Sets with strings to not have the
.intersection
method unfortunately