update
This commit is contained in:
@@ -72,4 +72,15 @@ function isURL(str)
|
||||
local _1, _2, prefix = str:find("^(%w-):")
|
||||
|
||||
return prefix == "http" or prefix == "https" or prefix == "data"
|
||||
end
|
||||
|
||||
function debounce(func, delay)
|
||||
local lastCall = 0
|
||||
return function(...)
|
||||
local now = timer.systime()
|
||||
if now - lastCall >= delay then
|
||||
lastCall = now
|
||||
return func(...)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user