I needed a way of adding some extra functionality to some existing functions but without wanting to touch the original functions’ code, essentially joining functions together.

This is what joint.js does.

I ended up making two versions, one for joining more than 2 functions which has more of an overhead, and a simpler one for just joining only two functions.

First include the joint function in your script

function joint(a){var b;return b=a[a.length-1],a.pop(),a=a.length>1?joint(a):a[0],function(){b.apply(new a)}}

Then use it like this;

// My original function that I want to extend
function my_func() {
    console.log( "Original functionality." );
}

// Function with the new functionality
function new_func() {
    console.log( "New functionality." );
}

// Add the functionality of new_func to my_func by joining functions
my_func = joint([ my_func, new_func ]);

// Now run the original function with the new functionality
my_func();

/* CONSOLE OUTPUT:
 > Original functionality.
 > New functionality.
*/

You can download the source on my GitHub here: https://github.com/Dayjo/joint/ or take a look at it working on JSBin

Alternatively you can see this post on coderwall.com here; https://coderwall.com/p/j-cega


Bing, is the new name for yet another re-launch Windows Live (MSN) Search, the search engine provided by Microsoft as a rival to Google.

Microsoft are launching an $80M – $100M ad campaign for the launch which is to occur in June.

Who knows what they’re USP is, currently Live Search isn’t particularly attractive to me personally, in that I mean, they’ve not convinced me to change my home page from google to live search.

Let’s wait and see what they do with Bing.

Please see my followup post here: Microsoft Bing – Image Search