Skip to content

Instantly share code, notes, and snippets.

// Using commonjs js modules
import utils from './services/utils';
let array = [[1,2,[3]],4];
let newArray = utils.flat(array);
console.log(newArray);
/**
Logic to refresh token automatically without showing error to our users
*/
axiosInstance.interceptors.response.use(
(response: AxiosResponse) => {
return response;
},
(error: AxiosError) => {
if (