New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dbl-linked-list-ds

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbl-linked-list-ds - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

2

package.json

@@ -33,3 +33,3 @@ {

},
"version": "1.0.2",
"version": "1.1.0",
"devDependencies": {

@@ -36,0 +36,0 @@ "@types/mocha": "^5.2.5",

@@ -7,5 +7,7 @@ import { LinkedListNode } from './LinkedListNode';

private tailN;
constructor(...values: T[]);
add(val: T): LinkedListNode<T>;
forEach<C>(f: ((value: LinkedListNode<T>) => void), ctx?: C): void;
head(): Node<T>;
pop(): T | undefined;
remove(n: LinkedListNode<T>): void;

@@ -12,0 +14,0 @@ tail(): Node<T>;

@@ -5,6 +5,9 @@ "use strict";

class LinkedList {
constructor() {
constructor(...values) {
this.length = 0;
this.headN = undefined;
this.tailN = undefined;
for (const i of values) {
this.add(i);
}
}

@@ -37,2 +40,9 @@ add(val) {

}
pop() {
const h = this.head();
if (h !== undefined) {
this.remove(h);
return h.value;
}
}
remove(n) {

@@ -39,0 +49,0 @@ if (n.left !== undefined && n.right !== undefined) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc