circular-linked-list
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "circular-linked-list", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Circular singly linked list, heavily based on Singlie by Klaus Sinani.", | ||
@@ -5,0 +5,0 @@ "main": "dist/circular-linked-list.js", |
# Circular-linked-list | ||
![](http://img.badgesize.io/TimvanScherpenzeel/circular-linked-list/master/dist/circular-linked-list.js.svg?compression=gzip&maxAge=60) | ||
[![npm version](https://badge.fury.io/js/circular-linked-list.svg)](https://www.npmjs.com/package/circular-linked-list) | ||
@@ -20,17 +21,17 @@ [![dependencies](https://david-dm.org/timvanscherpenzeel/circular-linked-list.svg)](https://david-dm.org/timvanscherpenzeel/circular-linked-list) | ||
const circularLinkedList = new CircularLinkedList(); | ||
const list = new CircularLinkedList(); | ||
circularLinkedList.append("B").prepend("A"); | ||
list.append("B").prepend("A"); | ||
console.log(circularLinkedList.node(0)); | ||
console.log(list.node(0)); | ||
// => Node { value: 'A', next: Node { value: 'B', next: [CircularLinkedList] } } | ||
console.log(circularLinkedList.node(0).next); | ||
console.log(list.node(0).next); | ||
// => Node { value: 'B', next: Node { value: 'A', next: [CircularLinkedList] } } | ||
console.log(circularLinkedList.node(0).next.next); | ||
console.log(list.node(0).next.next); | ||
// => Node { value: 'A', next: Node { value: 'B', next: [CircularLinkedList] } } | ||
console.log( | ||
circularLinkedList | ||
list | ||
.map(x => `[${x}]`) | ||
@@ -37,0 +38,0 @@ .reverse() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
239576
330