Skip to content

Instantly share code, notes, and snippets.

View RemiArnaud's full-sized avatar

Rémi Arnaud RemiArnaud

  • arroyo grande, ca
View GitHub Profile
@jonjaques
jonjaques / example.js
Last active October 25, 2017 06:04
Library agnostic version of jQuery's Extend
function myFunction(opts) {
var defaults = {
param1: 'foo',
param2: 'bar'
};
var options = __extend(defaults, opts);
return options;
}
myFunction({param2: 'baz'}); // { param1: 'foo', param2: 'baz' }