export const timeout = (duration = 0, shouldReject = false) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
if (shouldReject) {
reject(`${duration}ms 후, 거절 처리 됨.`)
} else {
resolve(`${duration}ms 후, 승인 처리 됨.`)
}
}, duration)
})
}
export const log = (...args) => console.log(...args)
export const logError = (...args) => console.error(...args)