Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
just-a-list
Advanced tools
A linked list implementation that draws on wikipedia's article on linked lists for available operations.
List
The linked list object returned when require is called on this library
var List = require('just-a-list');
var list = new List();
Node
The returned object type after insertion or removal from the list
var list = new List();
var node = list.insertBeginning('hello');
// list.head === node
// node.data === 'hello'
// node.next === null
insertBeginning(data)
Inserts data to the beginning of the list
var text = "hello my name is simon";
list.insertBeginning(text);
insertAfter(node, data)
Inserts data after the passed-in node
var intro = "hello my name";
var name = "is simon";
var node = list.insertBeginning(intro);
list.insertAfter(node, name);
removeBeginning()
Remove data from the beginning of the list
// list.length() === 6
var node = list.removeBeginning();
// list.length() === 5
// node.data === "some data"
removeAfter(node)
Remove data after the passed-in node
var removedNode = list.removeAfter(node);
clear()
A convenience method that calls removeBeginning()
until the list is empty
// list.length() === 5
list.clear();
// list.length() === 0
reverse()
A convenience method that reverses the list
// list: 5 -> 6 -> 1 -> 4
list.reverse();
// list: 4 -> 1 -> 6 -> 5
head
The first node in the list
list.insertBeginning("hello");
console.log(list.head.data);
//> hello
list.insertBeginning("my name is");
console.log(list.head.next.data);
//> hello
length
The length of the list
console.log(list.length);
//> 5
FAQs
a linked-list implementation
The npm package just-a-list receives a total of 214 weekly downloads. As such, just-a-list popularity was classified as not popular.
We found that just-a-list demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.