-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Birth of parseBool()
#455
Birth of parseBool()
#455
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for publishing your progress on #422! I left a few comments with my suggestions for techniques writing the isStringTruthy
utility function 😎
Reminder: Once your PR is no longer a WIP, update its name to accurately reflect the changes you will have made.
Co-authored-by: Ethan Davidson <[email protected]>
Co-authored-by: Ethan Davidson <[email protected]>
Co-authored-by: Ethan Davidson <[email protected]>
- Generated 10 events from the existing `events.ics` testdata file. - Created a test that verifies that the ICAL parser parses the code deterministically as expected.
This reverts commit af8c952.
determineTruthyString()
parseBool()
This reverts commit f6f85d1.
… parseBool that isn't falsy should return true. Resolves <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r879979282>.
* added common util folder, implemented isStringTruthy, added isPinned to acmEvent * cast DEBUG to string to check * Update isStringTruthy function signature Co-authored-by: Ethan Davidson <[email protected]> * Update isStringTruthy truthy check Co-authored-by: Ethan Davidson <[email protected]> * Update src/lib/common/utils.ts Co-authored-by: Ethan Davidson <[email protected]> * modified isStringTruthy and added test cases * Refactored truthiness checker function - Renamed to `determineTruthyString` * Updated tests for `determineTruthyString` * Updated import for `determineTruthyString` * Attempt number 1 at _Recent Events_ UI * Added ICAL parser integration testing - Generated 10 events from the existing `events.ics` testdata file. - Created a test that verifies that the ICAL parser parses the code deterministically as expected. * Show sample events if in debug mode and no events currently exist * Progress * Updated sample event data * This commit should fail the tests, but it won't * Resolved <EthanThatOneKid#455 (comment)> and <EthanThatOneKid#455 (comment)> * Revert "Attempt number 1 at _Recent Events_ UI" This reverts commit af8c952. * Renamed `determineTruthyString` to `parseBool` * Revert "This commit should fail the tests, but it won't" This reverts commit f6f85d1. * Included a case for "any non-falsy string" since any string passed to parseBool that isn't falsy should return true. Resolves <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r879979282>. * Refactored parseBool function Resolved <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r878605080>. Resolved <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r878605142>. * This is true progress. Co-authored-by: Ethan Davidson <[email protected]>
* added common util folder, implemented isStringTruthy, added isPinned to acmEvent * cast DEBUG to string to check * Update isStringTruthy function signature Co-authored-by: Ethan Davidson <[email protected]> * Update isStringTruthy truthy check Co-authored-by: Ethan Davidson <[email protected]> * Update src/lib/common/utils.ts Co-authored-by: Ethan Davidson <[email protected]> * modified isStringTruthy and added test cases * Refactored truthiness checker function - Renamed to `determineTruthyString` * Updated tests for `determineTruthyString` * Updated import for `determineTruthyString` * Attempt number 1 at _Recent Events_ UI * Added ICAL parser integration testing - Generated 10 events from the existing `events.ics` testdata file. - Created a test that verifies that the ICAL parser parses the code deterministically as expected. * Show sample events if in debug mode and no events currently exist * Progress * Updated sample event data * This commit should fail the tests, but it won't * Resolved <EthanThatOneKid#455 (comment)> and <EthanThatOneKid#455 (comment)> * Revert "Attempt number 1 at _Recent Events_ UI" This reverts commit af8c952. * Renamed `determineTruthyString` to `parseBool` * Revert "This commit should fail the tests, but it won't" This reverts commit f6f85d1. * Included a case for "any non-falsy string" since any string passed to parseBool that isn't falsy should return true. Resolves <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r879979282>. * Refactored parseBool function Resolved <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r878605080>. Resolved <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r878605142>. * This is true progress. Co-authored-by: Ethan Davidson <[email protected]>
src/lib/common/utils.ts
for general purpose utility functionsisStringTruthy
thereisStringTruthy
functionacmEvent
interface to includeisPinned : boolean
attribute