#Spinal Queue Spec
This specification declares the interface for the "spinal" queue in PowerQueue.
We allready have two implementations the MicroQueue and ReactiveList
#SpinalQueue Provides a simple reactive list interface
-
Arguments
fifo- Example:
  var list = new SpinalQueue();
  list.insert(1, { text: 'Hello id: 1' });
  list.insert(2, { text: 'Hello id: 2' });
  list.insert(3, { text: 'Hello id: 3' });
  list.update(2, { text: 'Updated 2'});
  list.remove(1);
  
  list.forEach(function(value, key) {
    console.log('GOT: ' + value.text);
  }, true); // Set noneReactive = true, default behaviour is reactive
  // Return from Template:
  Template.hello.list = function() {
    return list.fetch();
  };
-
-
This method length is defined in SpinalQueue
Returns {number} (is reactive) Length of the reactive list
-
-
This method reset is defined in SpinalQueue
-
-
This method update is defined in SpinalQueue
Arguments
Note: Method is currently not used by
PowerQueue
-
-
This method insert is defined in SpinalQueue
Arguments
-
-
This method remove is defined in SpinalQueue
Arguments
-
-
This method getLastItem is defined in SpinalQueue
Returns {any} Pops last item from the list - removes the item from the list
Note: Method is currently not used by
PowerQueue
-
-
This method getFirstItem is defined in SpinalQueue
Returns {any} Pops first item from the list - removes the item from the list
-
This method forEach is defined in SpinalQueue
Arguments
funciton(value, key)-
-
This method forEachReverse is defined in SpinalQueue
Arguments
funciton(value, key)-
-
This method fetch is defined in SpinalQueue
Arguments
-
Returns {array} (is reactive) List of items
-