npm.io
2.4.2 • Published 6 months ago

@quenty/queue

Licence
MIT
Version
2.4.2
Deps
0
Size
8 kB
Vulns
0
Weekly
0
Stars
596
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

Queue

Queue class with better performance characteristics than table.remove()

Installation

npm install @quenty/queue --save

Usage

local queue = Queue.new()
queue:PushRight("a")
queue:PushRight("b")
queue:PushRight("c")

while not queue:IsEmpty() do
    local entry = queue:PopLeft()
    print(entry) --> a, b, c
end

Keywords