data-structure-algebra/circularly-linked-list

View on GitHub
src/Node.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * Base node class.
 *
 * @class
 * @param {any} value The value to hold.
 */
export default function Node(value) {
    /** @member {any} The value/key held by this node. */
    this.value = value;
    /** @member {Node} Pointer to previous (left) sibling */
    this.prev = this;
    /** @member {Node} Pointer to next (right) sibling */
    this.next = this;
}