Skip to content

Bucket:Every()

paige edited this page Aug 17, 2023 · 2 revisions
  • desc: loops through the insides and checks if EVERY entry passes a given action
  • returns: Boolean
  • args: Function
local bucket = Bucket.new({ "a", "b", "c" })

bucket:Every(function(Key, Value, Index, Type)
    return Value == "a" -- false
end)

bucket:Every(function(Key, Value, Index, Type)
    return Value == "d" -- false
end)

bucket:Every(function(Key, Value, Index, Type)
    return type(Value) == "string" -- true
end)

Clone this wiki locally