Skip to content

Commit

Permalink
feat(tools): add a readonly empty table for common usage
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Aug 12, 2024
1 parent 0960f88 commit e39badb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kong/tools/table.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ local getmetatable = getmetatable
local _M = {}


_M.EMPTY = require("pl.tablex").readonly({})


--- packs a set of arguments in a table.
-- Explicitly sets field `n` to the number of arguments, so it is `nil` safe
_M.pack = function(...) return {n = select("#", ...), ...} end
Expand Down

0 comments on commit e39badb

Please sign in to comment.