Day 25: urlparamify- the beginning

1 min read    27 May 2017    

There seems to be a lack of url handling modules in npm, so might possibly be writing and publishing one. This will be used further to handle in iOS and web both.

So, us backend interns went off for lunch, and two amongst us were interested in drinks. The things that occured there caused me to think, what is worse: faking you enjoy the company of others, or going on your own, alone ?

To bind, or not to bind -that is the question

My current task required to pass a function as parameter. Now, if my function is callable, everything’s fine. But what about when it’s using this ? I will have to bind this to the current function. But when should one not bind ? For callable functions. Rule of thumb, assume function passed as parameter is made callable, and when passing down parameter, check if function needs to use this. If it does, use bind, else not.

So there’s this module ‘url’ on npm, which fails in a lot of cases, ex:, and etc. So we’ve decided to implement from scratch to parse urls. I would vote for calling it simpleurl, because Keep it simple, stupid!.

Some rights reserved.

Leave a Comment