
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
node-linkedlist
Advanced tools
An implementation of the concept of double linked lists.
Quick example to get an instance of the linked list:
var LinkedList = require('node-linkedlist')
, User = require('../Object/User')
, list = LinkedList.Create(User);
...
var user = User.Create();
list.add(user, function(err, listObj) {
...
...
});
Example
var list = require("node-linkedlist").Create()
...
console.log(list.size);
Arguments
dataType (constructor) - The constructor of the class extending the standard node object.return (LinkedList) - The list itself is returned.Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create()
, User = require('<path>/User');
list.setDataType(User);
Alternatively you can publish the constructor directly on create the ''LinkedList'' instance.
var LinkedList = require("node-linkedlist")
, User = require('<path>/User')
, list = LinkedList.Create(User);
...
...
It is important to know that if you publish a constructor to the ''LinkedList'' instance after adding nodes all of them are lost because publishing requires to set a new first node of the published constructor. It is planned to realize a mixed-mode of nodes which have implemented a standard interface.
Arguments
data (string) - The data to add to the list. It can be a node object too.callback (function) - The callback function with parameter err and listObj.return (listObj) - The LinkedList instance itself.Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create()
, node = list.node;
...
list.add('FirstName', function(err, listObj) {
if (err) console.log(err);
else {
console.log(listObj.size);
}
});
Arguments
property (string) - The nodes property to search in the value.value (*) - The value to search in the given property.return (node) - The node you searched or null if it can't be found.Example
var LinkedList = require("node-linkedlist")
, User = require('<path>/User')
, list = LinkedList.Create(User);
...
list.searchBy('FirstName', "Warden");
Arguments
position (number) - The position of the node that is wanted. If the position less equal '0' or higher than the list size
the first or last node is returned.raw (boolean) - A flag to get the node itself instead of the value only. Default is false.return (Node) - The node at the position or first/last node if the position is less/equal 0 or higher than list size.Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var node = list.get(54, true);
Arguments
position (number) - The position of the node which has to be removed.return (LinkedList) - The list itself is returned.Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
list.delete(54, true);
Arguments
return (node) - The first node in the list.Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var firstNode = list.first();
Arguments
return (node) - The last node in the list.Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var firstNode = list.last();
Arguments
node (object) - The node that will be compared with the constructor of the standard node.return (boolean) - True if the given node is a standard node. Otherwise false is returned.Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var node = ...;
if (list.isStdNode(node)) {
...
...
}
Arguments
return (LinkedList) - The list itself is returned.Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
list.clean();
Arguments
return (Array) - All nodes in an array.Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var nodes = list.toArray();
...
Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create()
, node = null;
// Traversing forwards
for(node = list.first(); list.hasNext(); node = list.next()) {
...
...
}
// or backwards
for(node = list.last(); list.HasPrevious(); node.previous()) {
...
...
}
Arguments
Example
var list = require("node-linkedlist").Create()
, node = list.node;
var newNode = node.Create();
Arguments
Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var last = list.last()
, node = list.node.Create();
node.setValue({
field1: true,
field2: 123,
field3: {success: true},
field4: "Everything's fine."
});
last.setNext(node);
...
Arguments
Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var node = list.first()
...
node = node.next();
...
Arguments
Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var node = list.first()
...
if (node.hasNext())
node = node.next();
...
Arguments
Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create()
, node = list.node;
...
var last = node.Create()
, newNode = node.Create();
last.setValue({
field1: true,
field2: 123,
field3: {success: true},
field4: "Everything's fine."
});
newNode.setValue("Only a small text string...");
last.setPrevious(newNode);
...
Arguments
Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var node = list.last()
...
node = node.previous();
...
Arguments
Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create();
...
var node = list.last()
...
if (node.hasPrevious())
node = node.previous();
...
Arguments
Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create()
, Node = list.node;
...
var node = list.last()
...
var newNode = Node.Create();
newNode.setValue({message: 'Created new node.'});
node.setNext(newNode);
...
Arguments
Example
var LinkedList = require("node-linkedlist")
, list = LinkedList.Create()
, Node = list.node;
...
var node = list.last()
console.log(node.getValue());
...
FAQs
Double linked list features
The npm package node-linkedlist receives a total of 24 weekly downloads. As such, node-linkedlist popularity was classified as not popular.
We found that node-linkedlist 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.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.