api / src /lib /tools.js
clash-linux's picture
Upload 14 files
121e67d verified
raw
history blame contribute delete
244 Bytes
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms))
function isJsonString(str) {
try {
JSON.parse(str)
return true
} catch (e) {
return false
}
}
module.exports = {
sleep,
isJsonString
}