1 min readNov 11, 2016
That’s what I’m saying in the conclusion. You can obviously extract that logic to a function. Later when you need it in a different project you’ll extract it to a module. Later more needs come and eventually you will regret not simply using a third party module which is already battle tested and used and maintained by many people.