function once (fn) { var called = false; return function () { if (!called) { called = true; fn.apply(this, arguments); } } }