extraction of jQuery.extend; tested and proven for your use in node.js