Skip to content

2.0.0

Choose a tag to compare

@jheagle jheagle released this 21 Sep 19:54
f775c12

Breaking: Queue and Stack are now the standard collections. Queue: enqueue(item) (returns the queue), dequeue() / peek() return the front item (null when empty), fromArray puts the first value at the front. Stack: push(item), pop() / peek() / top() return the top item (null when empty), fromArray pushes in turn so the last value is on top (was the first). Both are iterable, store any value exactly as given (functions, objects with a data property, null, 0) and are constant time. Queue.remove() / Stack.remove() are gone (use dequeue() / pop()), and the constructor / fromArray take (list, listClass, linkerClass). The previous task-running behaviour (dequeue / pop RUN the queued task) is kept, unchanged, as TaskQueue (with Queueable) and TaskStack (with Stackable), so migrating is a rename. New IsQueue / IsStack types; a Queue can be passed to si-funciona's queueManager / queueTimeout.