varbufferedFn=require('buffered-function');varsomefunction=bufferedFn(_somefunction);// _somefunction does not get called yetsomefunction('with','arguments','if you want');somefunction();// Wait for something to load or whateversetTimeout(function(){somefunction.ready();// Those queued calls to _somefunction now go through in the order they were made},500);function_somefunction(){/* ... */}