example/utils.js
function getAuth() {
    if (!auth.key || auth.key.indexOf("goes-here") !== -1) {
        var err = new Error("API key missing");
        out.error(err.message);
        throw err;
    }
    if (!auth.secret || auth.secret.indexOf("goes-here") !== -1) {
        var err = new Error("API secret missing");
        out.error(err.message);
        throw err;
    }
    return auth;
}
function getAuth() {
    if (!auth.key || auth.key.indexOf("goes-here") !== -1) {
        var err = new Error("API key missing");
        out.error(err.message);
        throw err;
    }
    if (!auth.secret || auth.secret.indexOf("goes-here") !== -1) {
        var err = new Error("API secret missing");
        out.error(err.message);
        throw err;
    }
    return auth;
}
function getAuth ( ) { if ( ! auth . key || auth . key . indexOf ( "goes-here" ) !== - 1 ) { var err = new Error ( "API key missing" ) ; out . error ( err . message ) ; throw err ; } if ( ! auth . secret || auth . secret . indexOf ( "goes-here" ) !== - 1 ) { var err = new Error ( "API secret missing" ) ; out . error ( err . message ) ; throw err ; } return auth ; }
Return the authentication parameters, if available.
Otherwise, log to stderr and throw an error indicating missing
authentication parameters.

@return {Object} auth
Return the authentication parameters if available . Otherwise log to stderr and throw an error indicating missing authentication parameters .