mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Added lume.pick()
to README
This commit is contained in:
parent
044141fefa
commit
6dec4a8f56
@ -252,6 +252,12 @@ values the keys.
|
||||
lume.invert({a = "x", b = "y"}) -- returns {x = "a", y = "b"}
|
||||
```
|
||||
|
||||
### lume.pick(t, ...)
|
||||
Returns a copy of the table filtered to only contain values for the given keys
|
||||
```lua
|
||||
lume.pick({ a = 1, b = 2, c = 3 }, "a", "c") -- Returns { a = 1, c = 3 }
|
||||
```
|
||||
|
||||
### lume.keys(t)
|
||||
Returns an array containing each key of the table.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user