feat: Add localRequire fn

This commit is contained in:
punkfairie 2024-11-29 17:13:20 -08:00
parent 123dfb81f9
commit e9902fad73
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696

View file

@ -0,0 +1,11 @@
local M = {}
---@param prefix string The string to prefix to all req calls.
function M.localRequire(prefix)
---@param mod string The module to require.
return function(mod)
return require(prefix .. '.' .. mod)
end
end
return M