1.2.1 • Published 7 years ago

listiterator v1.2.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

listiterator API:

下载 npm install listiterator

引入模块

	let Iterator = require("listiterator");

构造函数传入数组,创建迭代器

	let it = new Iterator([1,2,3,4]);

获取下一个元素

	it.next();

删除当前元素

	it.remove();

是否存在下一个元素

	it.hasNext();

判断是否存在上一个元素

	it.hasPrevious();

逆向遍历,获取上一个元素

	it.previous();

替换当前指针指向元素

	it.set(value);

返回对 next 的后续调用所返回元素的索引

	it.nextIndex();

关于作者: email:admin@w3c.top

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago