Skip to content

Instantly share code, notes, and snippets.

View mostafawkhd's full-sized avatar

Mostafa Khoshnood mostafawkhd

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mostafawkhd on github.
  • I am mkhoshnood (https://keybase.io/mkhoshnood) on keybase.
  • I have a public key ASCp0FMxxDXKQRHugglvGlyUppErRA7ld0sS4RXsq41jwwo

To claim this, I am signing this object:

@mostafawkhd
mostafawkhd / CountryCodes.json
Created December 18, 2023 14:33 — forked from anubhavshrimal/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@mostafawkhd
mostafawkhd / axios.refresh_token.1.js
Created August 22, 2022 04:28 — forked from Godofbrowser/axios.refresh_token.1.js
Axios interceptor for refresh token when you have multiple parallel requests. Demo implementation: https://github.com/Godofbrowser/axios-refresh-multiple-request
// for multiple requests
let isRefreshing = false;
let failedQueue = [];
const processQueue = (error, token = null) => {
failedQueue.forEach(prom => {
if (error) {
prom.reject(error);
} else {
prom.resolve(token);