Lua-Collections
Lua-Collections copied to clipboard
Compare a table's values to the collection, even if the keys aren't the same
A method to return a boolean; if true, the table passed to the method matches the values in the collection, even if they do not share the same keys and order.
collect({'cats', 'dogs', 'rabbits'}):match({'dogs', 'rabbits', 'cats'})
-- true
collect({'cats', 'dogs', 'rabbits'}):match({'cats'})
-- false