Comparing version 0.1.0 to 0.2.0
# Changes | ||
## v0.1.0 | ||
## 0.2.0 | ||
- Expose name of current iterated item on iterator | ||
## 0.1.0 | ||
- Initial release |
@@ -15,4 +15,5 @@ /* | ||
function Iterator(root, match, opts) { | ||
this._i = root.iterator(match, opts); | ||
this._ii = null; | ||
this._i = root.iterator(match, opts); | ||
this._ii = null; | ||
this.name = null; | ||
} | ||
@@ -25,12 +26,9 @@ | ||
while (true) { | ||
if (this._ii) { | ||
v = this._ii.next(); | ||
if (v !== undefined) { | ||
return v; | ||
} | ||
if (this._ii && (v = this._ii.next()) !== undefined) { | ||
return v; | ||
} | ||
v = this._i.next(); | ||
if (!v) { | ||
if ((v = this._i.next()) === undefined) { | ||
return; | ||
} | ||
this.name = v.path; | ||
this._ii = v.value.iterator(); | ||
@@ -37,0 +35,0 @@ } |
{ | ||
"name" : "glob-store", | ||
"version" : "0.1.0", | ||
"version" : "0.2.0", | ||
"description" : "Key-value store with iterator and glob semantics", | ||
@@ -10,9 +10,9 @@ "keywords" : ["store", "glob", "key-value"], | ||
"engines" : { | ||
"node" : ">=0.8" | ||
"node" : ">=0.10" | ||
}, | ||
"scripts" : { | ||
"start" : "mocha --watch -R min", | ||
"lint" : "jslint --color -- ./**/*.js", | ||
"test-wd" : "mochify --wd -R dot", | ||
"test" : "npm run lint && mocha -R dot && mochify -R dot" | ||
"start" : "mochify --watch --node --cover", | ||
"lint" : "jslint --color './**/*.js'", | ||
"test-wd" : "mochify --wd", | ||
"test" : "npm run lint && mocha -R spec && mochify --cover" | ||
}, | ||
@@ -31,6 +31,4 @@ "repository" : { | ||
"mocha" : ">=1.17 <2", | ||
"jslint" : "~0.2.7", | ||
"browserify" : ">=3.19 <4", | ||
"coverify" : "~1.0.6", | ||
"mochify" : "~0.3.1" | ||
"jslint" : "~0.3.1", | ||
"mochify" : "~0.7.0" | ||
}, | ||
@@ -37,0 +35,0 @@ "files" : ["lib", "README.md", "CHANGES.md", "LICENSE"], |
@@ -34,3 +34,3 @@ # glob-store.js [![Build Status](https://travis-ci.org/mantoni/glob-store.js.png?branch=master)](http://travis-ci.org/mantoni/glob-store.js) | ||
while ((c = i.next()) !== undefined) { | ||
console.log(c); | ||
console.log(i.name + ': ' + c); | ||
} | ||
@@ -37,0 +37,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5820
3
93