ferret.js
function(ferret, fn) {
    if (ferret._ready) {
        return fn(null)
    } else if (ferret._error) {
        return fn(new Error('Not connected to the database'))
    } else {
        ferret._readyQueue.push(fn)
    }
}
function(ferret, fn) {
    if (ferret._ready) {
        return fn(null)
    } else if (ferret._error) {
        return fn(new Error('Not connected to the database'))
    } else {
        ferret._readyQueue.push(fn)
    }
}
function ( ferret , fn ) { if ( ferret . _ready ) { return fn ( null ) } else if ( ferret . _error ) { return fn ( new Error ( 'Not connected to the database' ) ) } else { ferret . _readyQueue . push ( fn ) } }
Run a function right now if ready, or queue it for later
Run a function right now if ready or queue it for later