src/lib/collections/linked-list.js
function (value) {
        var node;

        if (value instanceof LinkedListNode) {
            node = value;
            validateNode(node, this);

            if (node._next === node) {
                this.head = null;
            }
            else {
                node._next._prev = node._prev;
                node._prev._next = node._next;

                if (this.head === node) {
                    this.head = node._next;
                }
            }
            node._list = null;
            node._next = null;
            node._prev = null;
            this.size--;

            return true;
        }
        else {
            if ((node = this.find(value)) !== null) {
                this.remove(node);
                return true;
            }
            return false;
        }
    }
function (value) {
        var node;

        if (value instanceof LinkedListNode) {
            node = value;
            validateNode(node, this);

            if (node._next === node) {
                this.head = null;
            }
            else {
                node._next._prev = node._prev;
                node._prev._next = node._next;

                if (this.head === node) {
                    this.head = node._next;
                }
            }
            node._list = null;
            node._next = null;
            node._prev = null;
            this.size--;

            return true;
        }
        else {
            if ((node = this.find(value)) !== null) {
                this.remove(node);
                return true;
            }
            return false;
        }
    }
function ( value ) { var node ; if ( value instanceof LinkedListNode ) { node = value ; validateNode ( node , this ) ; if ( node . _next === node ) { this . head = null ; } else { node . _next . _prev = node . _prev ; node . _prev . _next = node . _next ; if ( this . head === node ) { this . head = node . _next ; } } node . _list = null ; node . _next = null ; node . _prev = null ; this . size -- ; return true ; } else { if ( ( node = this . find ( value ) ) !== null ) { this . remove ( node ) ; return true ; } return false ; } }
Removes Removes the specified node or the first occurrence of the specified value from the LinkedList.
@param {LinkedListNode|Object} value The LinkedListNode or the value to remove from the LinkedList.
@returns {Boolean}
Removes Removes the specified node or the first occurrence of the specified value from the LinkedList .