I don't like to re-implement always the same code, so I collect snippets and share them with everyone!
Local Storage Database with Typescript
Local storage database implementation in typescript with schema validation and error handling, using functional programming (fp-ts) and zod.
isNotNullable - Check if a variable is not nullable in Typescript
Function used to check if a variable is not nullable and narrow its type using Typescript.
Form data validation hook with fp-ts and functional programming
React hook used to store, update, and validate data using functional programming with fp-ts.
Pure function to shuffle an array in Typescript using fp-ts
A pure function that allows you to shuffle an array using functional programming with fp-ts in Typescript.
Pure function to update elements in array that are equal in Typescript
A pure function that allows to update all the elements in an array that are equal to a given equality check.
useDebounceUpdate - Running an effect after a timeout
Execute a function after a timeout every time your data changes. Reset the timer if the data changes again during the timeout.