-
- Downloads
Extract input handler into lib file
There are input handlers used on three different pages right now. The code was basically the same on all of them. Recently one of them got updated slightly by adding a paste event listener. The others did not get an update. Even though the handler itself is not something complex it is better to have it extracted into a library function that gets used by all functions. Less code duplication and if there is an update to it in the future, it automatically gets applied everywhere.
Showing
- src/lib/inputhandler.js 38 additions, 0 deletionssrc/lib/inputhandler.js
- src/routes/+page.svelte 3 additions, 17 deletionssrc/routes/+page.svelte
- src/routes/admin/restock/+page.svelte 3 additions, 20 deletionssrc/routes/admin/restock/+page.svelte
- src/routes/login/+page.svelte 3 additions, 26 deletionssrc/routes/login/+page.svelte
src/lib/inputhandler.js
0 → 100644
Please register or sign in to comment