A curated websites sync with the Notion Database. Generated by Awesome Reading List
| 이름 | URL |
A curated websites sync with the Notion Database. Generated by Awesome Reading List
| 이름 | URL |
A curated websites sync with the Notion Database. Generated by Awesome Reading List
A curated websites sync with the Notion Database. Generated by Awesome Reading List
A curated reading list sync with the Notion Database. Generated by Awesome Reading List
const mock = (success, timeout) => { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
if(success) { | |
resolve(); | |
} else { | |
reject({message: 'Error'}); | |
} | |
}, timeout); | |
}); |
const handleErrors = (res: Response) => { | |
if (!res.ok) { | |
throw Error(res.statusText); | |
} | |
return res; | |
} | |
fetch("http://httpstat.us/500") | |
.then(handleErrors) |
const filterObj = (obj, f) => (o=Object).fromEntries(o.entries(obj).filter([k,v]=>f(k))) | |
const select = (obj, ...props) => filterObj(obj, k => props.includes(k)) | |
const omit = (obj, ...props) => filterObj(obj, k => !props.includes(k)) |