mirror of
https://github.com/TangentFoxy/lume.git
synced 2025-07-28 02:52:21 +00:00
Changed lume.merge() functionality, updated README and doc
- The old functionality of lume.merge() is now spread across lume.merge() (for tables) and lume.concat() (for arrays). Both these functions create new tables rather than operating in-place - Changed lume.fn() to use lume.concat() internally
This commit is contained in:
@@ -216,8 +216,9 @@ end
|
||||
|
||||
-- lume.merge
|
||||
tests["lume.merge"] = function()
|
||||
testeq( lume.merge({1, 2, 3}, {8, 9, 0}), {1, 2, 3, 8, 9, 0} )
|
||||
testeq( lume.merge({a=1, b=2}, {b=3, c=4}, true), {a=1, b=3, c=4} )
|
||||
testeq( lume.merge(), {} )
|
||||
testeq( lume.merge({x=1, y=2}), {x=1, y=2} )
|
||||
testeq( lume.merge({a=1, b=2}, {b=3, c=4}), {a=1, b=3, c=4} )
|
||||
end
|
||||
|
||||
-- lume.concat
|
||||
|
Reference in New Issue
Block a user