backend: try to remove ms dependency #9

Closed
opened 2022-07-13 15:50:20 +00:00 by Johann150 · 1 comment
Owner

ms is a package to convert string representations to a number of milliseconds, e.g. convert '1h' to 3_600_000. Having this dependency seems unnecessary.

I'm not sure if we should directly hard code the numbers with a comment next to them or have a file with a bunch of constants like this:

export const SECOND = 1000;
export const MINUTE = 60 * SEC;
export const HOUR = 60 * MIN;
`ms` is a package to convert string representations to a number of milliseconds, e.g. convert `'1h'` to `3_600_000`. Having this dependency seems unnecessary. I'm not sure if we should directly hard code the numbers with a comment next to them or have a file with a bunch of constants like this: ```javascript export const SECOND = 1000; export const MINUTE = 60 * SEC; export const HOUR = 60 * MIN; ```
Johann150 added this to the (deleted) project 2022-07-13 15:50:20 +00:00
Owner

Probably a file with constants will work. Somewhere backend/src/misc or something like that?

Probably a file with constants will work. Somewhere backend/src/misc or something like that?
Johann150 self-assigned this 2022-07-13 21:35:54 +00:00
toast closed this issue 2022-07-16 23:38:56 +00:00
norm referenced this issue from a commit 2022-08-28 14:46:46 +00:00
Johann150 added the
upkeep
label 2022-12-23 10:24:54 +00:00
Sign in to join this conversation.
No Label
feature
fix
upkeep
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: FoundKeyGang/FoundKey#9
No description provided.