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

        var newNode;

        if (value instanceof LinkedListNode) {
            newNode = value;
            this.insertNodeBefore(node._next, newNode);
        }
        else {
            newNode = new LinkedListNode(value);
            this.addAfter(node, newNode);
        }

        return newNode;
    }
function (node, value) {
        assertType(node, LinkedListNode);

        var newNode;

        if (value instanceof LinkedListNode) {
            newNode = value;
            this.insertNodeBefore(node._next, newNode);
        }
        else {
            newNode = new LinkedListNode(value);
            this.addAfter(node, newNode);
        }

        return newNode;
    }
function ( node , value ) { assertType ( node , LinkedListNode ) ; var newNode ; if ( value instanceof LinkedListNode ) { newNode = value ; this . insertNodeBefore ( node . _next , newNode ) ; } else { newNode = new LinkedListNode ( value ) ; this . addAfter ( node , newNode ) ; } return newNode ; }
Adds the specified new node after the specified existing node in the LinkedList.
@param {LinkedListNode} node The LinkedListNode after which to insert newNode.
@param {LinkedListNode|Object} value The value or the LinkedListNode to add to the LinkedList.
@returns {LinkedListNode}
Adds the specified new node after the specified existing node in the LinkedList .