Added lume.concat(), updated README and tests

This commit is contained in:
rxi
2015-01-10 17:13:15 +00:00
parent ce86f4b0ea
commit 397dce4c5e
3 changed files with 27 additions and 0 deletions

View File

@@ -159,6 +159,12 @@ and `t2` have a conflicting key, the value from `t2` is used.
lume.merge({2, 3}, {4, 5}) -- Returns {2, 3, 4, 5}
```
### lume.concat(...)
Returns a new array consisting of all the given arrays concatenated into one.
```lua
lume.concat({1, 2}, {3, 4}, {5, 6}) -- Returns {1, 2, 3, 4, 5, 6}
```
### lume.find(t, value)
Returns the index/key of `value` in `t`. Returns `nil` if that value does not
exist in the table.