Skip to content

Instantly share code, notes, and snippets.

View seansheds's full-sized avatar

Sean Shedlarski seansheds

  • Los Angeles, CA
View GitHub Profile
@seansheds
seansheds / gist:fdb3cda6931d734d9b57
Last active August 29, 2015 14:05
Once Function
function once(fn, context) {
var result;
return function() {
if(fn) {
result = fn.apply(context || this, arguments);
fn = null;
}
return result;