Comparing version 0.1.5 to 0.1.6
35
es5.js
@@ -944,7 +944,7 @@ (function( | ||
} | ||
if(startValue === undefined){ | ||
startValue = this.generator().next().value; | ||
} | ||
var myStartValue = startValue || this.generator().next().value; | ||
var that = this; | ||
var newGrunge = new Grunge(wrapGenerator.mark(function $callee() { | ||
var iterator, temp, lastValue, i; | ||
var iterator, lastValue, temp, i; | ||
@@ -954,4 +954,4 @@ return wrapGenerator(function $callee$($ctx9) { | ||
case 0: | ||
iterator = this.generator(); | ||
temp = startValue; | ||
iterator = that.generator(); | ||
lastValue = {value : myStartValue}; | ||
case 2: | ||
@@ -963,6 +963,7 @@ if (!true) { | ||
temp = startValue !== undefined ? startValue : lastValue.value; | ||
i = 0; | ||
case 4: | ||
case 5: | ||
if (!(i < count)) { | ||
$ctx9.next = 12; | ||
$ctx9.next = 13; | ||
break; | ||
@@ -972,20 +973,18 @@ } | ||
lastValue = iterator.next(); | ||
temp = func(lastValue.value, startValue); | ||
temp = func(lastValue.value, temp); | ||
if (!lastValue.done) { | ||
$ctx9.next = 9; | ||
$ctx9.next = 10; | ||
break; | ||
} | ||
return $ctx9.abrupt("break", 12); | ||
case 9: | ||
return $ctx9.abrupt("break", 13); | ||
case 10: | ||
i++; | ||
$ctx9.next = 4; | ||
$ctx9.next = 5; | ||
break; | ||
case 12: | ||
$ctx9.next = 14; | ||
case 13: | ||
$ctx9.next = 15; | ||
return temp; | ||
case 14: | ||
temp = lastValue.value; | ||
case 15: | ||
if (!lastValue.done) { | ||
@@ -992,0 +991,0 @@ $ctx9.next = 17; |
16
index.js
@@ -322,13 +322,14 @@ (function(root, factory){ | ||
} | ||
if(startValue === undefined){ | ||
startValue = this.generator().next().value; | ||
} | ||
var myStartValue = startValue || this.generator().next().value; | ||
var that = this; | ||
var newGrunge = new Grunge(function* () { | ||
var iterator = this.generator(); | ||
var temp = startValue; | ||
var lastValue; | ||
var iterator = that.generator(); | ||
//var temp = myStartValue; | ||
var lastValue = {value : myStartValue}; | ||
while(true){ | ||
var temp = startValue !== undefined ? startValue : lastValue.value; | ||
for(var i = 0; i < count; i++){ | ||
lastValue = iterator.next(); | ||
temp = func(lastValue.value, startValue); | ||
temp = func(lastValue.value, temp); | ||
if(lastValue.done){ | ||
@@ -339,3 +340,2 @@ break; | ||
yield temp; | ||
temp = lastValue.value; | ||
if(lastValue.done){ | ||
@@ -342,0 +342,0 @@ break; |
{ | ||
"name": "grunge", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "A generator-based sequence generator and utility.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
43522
0
1230