Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
a linklist of javascript from node
JavaScript
branch: master
Failed to load latest commit information.
lib add `length`
test add `length`
.gitignore Initial commit
Makefile linklist
README.md linklist
benchmark.js linklist
index.js linklist
package.json add `length`

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.