chore: format files

This commit is contained in:
Akianonymus
2021-10-02 10:45:50 +05:30
committed by siduck76
parent 317eedd9b2
commit d810cc35a7
4 changed files with 64 additions and 65 deletions

View File

@@ -1,22 +1,22 @@
local function isModuleAvailable(name)
if package.loaded[name] then
return true
else
for _, searcher in ipairs(package.searchers or package.loaders) do
local loader = searcher(name)
if type(loader) == 'function' then
package.preload[name] = loader
return true
if package.loaded[name] then
return true
else
for _, searcher in ipairs(package.searchers or package.loaders) do
local loader = searcher(name)
if type(loader) == "function" then
package.preload[name] = loader
return true
end
end
end
return false
end
return false
end
end
local loadIfExists = function (module)
if isModuleAvailable(module) then
require(module)
end
local loadIfExists = function(module)
if isModuleAvailable(module) then
require(module)
end
end
loadIfExists('custom')
loadIfExists "custom"