Lua-Collections icon indicating copy to clipboard operation
Lua-Collections copied to clipboard

Compare a table's values to the collection, even if the keys aren't the same

Open imliam opened this issue 8 years ago • 0 comments

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

imliam avatar May 17 '17 15:05 imliam