Numeric Production Mechanism
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    runner-runner-collectionpublic

    Queue

    Class Queue

    'use strict';
    const Collection = require('runner-runner-collection');
    
    let queue = new Collection.Queue();
    
    queue.enqueue("Winnie");
    queue.enqueue("Christopher");
    queue.enqueue("Tigra");
    
    for (let object of queue) {
    	console.log(object);
    }
    

    Kind: global class

    queue.dequeue() ⇒ *

    Removes and returns an object from the head of the Queue

    Kind: instance method of Queue
    Returns: * - object from the head of the Queue

    queue.enqueue(object)

    Adds an object to the tail of the Queue

    Kind: instance method of Queue

    Param Type Description
    object * to be added to the tail of the Queue

    queue.peek() ⇒ *

    Returns an object from the head of the Queue, but does not remove it

    Kind: instance method of Queue
    Returns: * - object from the head of the Queue

    queue.clear()

    Removes all objects from the Queue

    Kind: instance method of Queue

    queue.contains(object)

    Tests if an object in the Queue

    Kind: instance method of Queue

    Param Type Description
    object Boolean to look

    queue.size() ⇒ Number

    Return a size of the Queue

    Kind: instance method of Queue
    Returns: Number - size of the Queue

    install

    npm i runner-runner-collection

    Downloadsweekly downloads

    0

    version

    1.0.1

    license

    BSD-2-Clause

    repository

    githubgithub

    last publish

    collaborators

    • avatar