I found myself using a weird way to add callback functions to my functions and I was wondering if there is a more generic way to add callbacks to functions, best case I would ha
Not sure what you are trying to do here, but a way to add a callback that seems more straight forward:
function( obj, callback ) { if(callback) { callback(); } }