July 15, 2014
So after my last post on npm packages being removed, I started to realise that I don’t know that many packages and most of the times I use what was already installed in the project. So I took to the interwebs looking for some most used packages. This led me to the list of the most depended-upon packages and here is a run down of the top 5:
async function. I have yet to work with this library,as the library is built around async processing I feel something like Q or another promise library could be used instead.
Request a simple lightweight and easy to use http library, providing the standard http CRUD methods. The request developers boast that the library is the easiest to use, I have used this before on some project for talking to third party APIs. This has proved tricky when you run into same site origin errors, however this was due to the scenario that I was working with. The below code shows how easy request is to use.
Lo-dash is another utility library that actually was the parent to the above mentioned underscore library. It contains many of the method’s such as map, each and some other advanced functions for creating curried functions and other patterns. It has since become a superset of Underscore, providing more consistent API behavior, more features (like AMD support, deep clone, and deep merge), more thorough documentation and unit tests (tests which run in Node, Ringo, Rhino, Narwhal, PhantomJS, and browsers), better overall performance and optimizations for large arrays/object iteration, and more flexibility with custom builds and template pre-compilation utilities.
Commander is a on stop shop for command line integration with Node JS. Following a method chaining structure commander allows you to pass options for the shell command. The library is strongly influenced by the Ruby commander gem. The main purpose of the commander package is to create a command line interface for your application. A very useful feature is the auto generation of help information and example is shown below:
© 2015 Chris Laughlin | Theme by Eleven Themes