extra-iterable
Advanced tools
Comparing version 3.0.120 to 3.0.121
@@ -987,3 +987,3 @@ /** | ||
/** | ||
* Move part of iterable within. TODO | ||
* Move part of iterable within. | ||
* [📘](https://github.com/nodef/extra-iterable/wiki/moveWithin) | ||
@@ -994,3 +994,3 @@ * @param x an iterable | ||
* @param I read end index [END] | ||
* @returns TODO | ||
* @returns x[0..j] ⧺ x[i..I] ⧺ x[j..i] ⧺ x[I..] | ||
* */ | ||
@@ -997,0 +997,0 @@ |
@@ -786,7 +786,9 @@ 'use strict'; | ||
} | ||
function* moveWithin(x, j = 0, i = 0, I = END) { | ||
function moveWithin(x, j = 0, i = 0, I = END) { | ||
if (j < i) | ||
yield* movePart(x, j, i, I); | ||
return movePart(x, j, i, I); | ||
else if (j > I) | ||
return movePart(x, i, I, j); | ||
else | ||
yield* movePart(x, i, I, j); | ||
return values(x); | ||
} | ||
@@ -793,0 +795,0 @@ function* movePart(x, j, k, l) { |
{ | ||
"name": "extra-iterable", | ||
"version": "3.0.120", | ||
"version": "3.0.121", | ||
"description": "An iterable is a sequence of values.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
124811
3864