Skip to content

Commit

Permalink
chore(neorg/core/lib): fix errors with lib.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Jan 5, 2024
1 parent 7eb4aca commit 48950f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/neorg/core/lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ function lib.lazy_copy(to_copy)
})
end

lib.mod = {}

--- Wrapper function to add two values.
--- This function only takes in one argument because the second value to add is provided as a parameter in the callback.
--- @param amount number The number to add.
Expand All @@ -487,6 +489,8 @@ function lib.mod.modify(to)
end
end

lib.mod.exclude = {}

function lib.mod.exclude.first(func, alt)
return function(i, val)
return i == 1 and (alt and alt(i, val) or val) or func(i, val)
Expand Down

0 comments on commit 48950f6

Please sign in to comment.