a linklist of javascript from node
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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);