Getting started with full stack development with the hapi framework.

I did some reading on the hapi framework for quickly making full stack applications. From what I have gathered it is a little more full featured out of the box compared to express, so I thought I would give it a try. As such this will be a sort of getting started, and first impressions kind of post. When I first wrote this post I was using hapi 16.x which it would seem is still being supported in 2019, as I can see the occasional bug fix and so forth in the github repo of the project.

Read More

The history of the lodash is array method and it's relevance today

Detecting if an Object is an Array is a trivial matter, or at least it is if you do not care a whole lot about backward compatibility. If you do want to march backward compatibility back to say IE 8 (latest IE for win xp), or even further to IE 6 (latest for win 9.x) then you can not depend on Array.isArray, or _.isArray in loash ether for that matter actually. The reason why is because in late versions lodash just references Array.isArray, where is older versions do provide a user space javaScript solution for this.

So the lodash isArray method is maybe one talking point about the relevancy of still using lodash, but even then only when it comes to pushing legacy support way back to older clients that not many people are using at this point. Even if you want to go way back with support, even if it is more or less just for the nostalgia aspect of doing so, then it is not just a question of using lodash. There is the question of what version to use, and also weather or not it might be better to have a certain custom trailered lodash utility library of sorts that you can call your own.

Read More

The lodash _.fill method and the vanilla js Array.fill alternative

There are methods that do really come in handy when using lodash, and really do provide something that is not just there in Array.prototype, however _.fill is not one of those these days. That is unless maybe you care a lot about browser support when it comes to using the native Array.fill method in the array prototype object. In this post I will be writing about the lodash _.fill method, as well as some vanilla js alternatives to help with a situation in which you just want to fill an array with a given static value.

So lodash is one of those JavaScript projects that is a bit of a mystery when it comes to the question of it’s value compared to just working within a plain old vanilla js environment, at least that seems to come up a lot a other blog posts, forum discussions, and podcasts when writing or talking about lodash. Still this post will be on the lodash fill method, as well as how to go about filling an arary or collection in general with native javaScript also.

Read More

The lodash _.drop method vs Array.shift, splice, and slice.

It looks like lodash is a bit of a mixed bag of methods some of which do not exist in javaScripts built in Array prototype, and other methods that appear to be redundant. There are also some methods that on the surface seem redundant but are actuality collection methods that will work with both arrays and objects in general. So maybe some of these methods are not so redundant and there is also the question of backward compatibility as well when it comes to defending the use of lodash these days. Still more often then not I tend to prefer to just work within core js by itself.

Read More