Skip to content

Instantly share code, notes, and snippets.

View 86XIng's full-sized avatar
🎯
Focusing

jjjkkkhhhggg 86XIng

🎯
Focusing
View GitHub Profile
@sebmarkbage
sebmarkbage / Infrastructure.js
Last active June 2, 2024 08:51
SynchronousAsync.js
let cache = new Map();
let pending = new Map();
function fetchTextSync(url) {
if (cache.has(url)) {
return cache.get(url);
}
if (pending.has(url)) {
throw pending.get(url);
}