I recently wrote a post on how to extend Lo-Dash with new functions using
_.mixin. The Lo-Dash docs have code samples that include adding new functions into their namespace, but what can you do to enhance an existing function?
I decided to investigate what patterns could be utilized to add features to existing functions. I also decided to revisit a problem recognized in an earlier post – allowing callbacks triggered by
_.result to receive parameters.
In my previous post on Lo-Dash utilities I covered how
_.result can be used to accomplish both chaining and simple callbacks (without parameters) via single return. In this post I’d like to explore rolling your own Lo-Dash functions using
(Alliteration somewhat intended)
Today we have Lo-Dash — the younger, more aggressive sibling to the well-established Underscore.JS. Created by John-David Dalton, Kit Cambridge, and Mathias Bynens, the library boasts additional features, bugfixes, and performance improvements over Underscore.JS. These are not trivial boasts, as Lo-Dash comes from some of the same developers behind Benchmark.JS and jsPerf.com. Let’s look at several features in the Lo-Dash/Underscore arsenal that can help save time when writing your next application.
With the introduction of Web Fonts into the browser mainstream, designers have gained access to a large quantity of design techniques that had only been possible using image replacement. The CSS3 Web Fonts module offers us an opportunity to rethink the way we style a site, and I for one am quite eager to begin taking advantage of it.
I felt the need to propagate to the interwebs a good resource I found today for setting up SSH to a guest OS using a host-only network:
I am running VirtualBox 4.1.4, but the blog entry is still quite relevant. The only difference is how to set up a host-only network. In the VirtualBox Virtual Machine Manager, under menu option File choose Preferences. Click the “Network” tab in the window that follows, and then you will see an interface for adding host-only network adapters.
The default network address is still 192.168.56.1, so the everything after that is applicable.
I recently wrote some functions in the global jQuery namespace that add array utilities. The list is small right now (only 3) but I hope to grow them as I have time, and can optimize as well. They are inspired by some useful PHP array functions that I have missed on the client-side.