const getApiUrl = (symbol, date) => { // replace all the dots in stock codes with underscore symbol = symbol.replace(/\./g, "_"); return `https://www.quandl.com/api/v3/datasets/WIKI/${symbol}\ .json?order=asc&column_index=4&start_date=${date}&api_key=${process.env.QKEY}`; }