function allSets(cb) {
    const ret = (cb) => {
        APIRequest("/sets", (resp) => {
            for (let i = 0; i < resp.length; i++) {
                resp[i].released_at = new Date(resp[i].released_at);
            }
            cb(resp);
        }, true);
    };
    if (cb) {
        ret(cb);
    }
    else {
        return new Promise((resolve, reject) => ret(resolve));
    }
}
/**
 * Fetches a list of all sets available on scryfall.
 * @param cb An optional callback to pass set data to.
 * @returns A promise, if no callback is specified. Otherwise nothing.
 */
Fetches a list of all sets available on scryfall.
@param cb An optional callback to pass set data to.
@returns A promise, if no callback is specified. Otherwise nothing.
Fetches a list of all sets available on scryfall . @param cb An optional callback to pass set data to . @returns A promise if no callback is specified . Otherwise nothing .
function allSets(cb) {
    const ret = (cb) => {
        APIRequest("/sets", (resp) => {
            for (let i = 0; i < resp.length; i++) {
                resp[i].released_at = new Date(resp[i].released_at);
            }
            cb(resp);
        }, true);
    };
    if (cb) {
        ret(cb);
    }
    else {
        return new Promise((resolve, reject) => ret(resolve));
    }
}
function allSets ( cb ) { const ret = ( cb ) => { APIRequest ( "/sets" , ( resp ) => { for ( let i = 0 ; i < resp . length ; i ++ ) { resp [ i ] . released_at = new Date ( resp [ i ] . released_at ) ; } cb ( resp ) ; } , true ) ; } ; if ( cb ) { ret ( cb ) ; } else { return new Promise ( ( resolve , reject ) => ret ( resolve ) ) ; } }
Fetches a list of all sets available on scryfall.
Fetches a list of all sets available on scryfall .