Skip to content
a linklist of javascript from node
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
Makefile
README.md
benchmark.js
index.js
package.json

README.md

js-linklist

node源码中的一个链表,添加了几个扩展的函数。

npm install linklist

Usage

var L = require('./');
var list = L.init();
L.append(list, {a:1});
L.appendBefore(list, {a:2});
L.traversal(list, function(item) {
  if (item.a === 1) {
    L.remove(item);
  }
});
L.clear(list);
L.isEmpty(list);
Something went wrong with that request. Please try again.