Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extra-iterable

Package Overview
Dependencies
Maintainers
1
Versions
468
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extra-iterable - npm Package Compare versions

Comparing version 3.0.117 to 3.0.118

6

index.d.ts

@@ -1104,5 +1104,5 @@ /**

* @param x an iterable
* @param i start index (0)
* @param n number of values (-1 ⇒ Inf)
* @returns TODO
* @param i start index [0]
* @param n number of values [-1 ⇒ Inf]
* @returns x[i..] ⧺ x ⧺ x ⧺ ... with upto n values
* */

@@ -1109,0 +1109,0 @@

@@ -940,6 +940,13 @@ 'use strict';

function* cycle(x, i = 0, n = -1) {
var x = toMany(x);
var i = i === 0 ? 0 : mod(i, length(x));
var x = toMany(x), X = 0;
if (i < 0) {
X = length(x);
if (X === 0)
return;
i = mod(i, X);
}
while (true) {
X = 0;
for (var v of x) {
++X;
if (--i >= 0)

@@ -951,2 +958,6 @@ continue;

}
if (X === 0)
return;
if (i >= X)
i = mod(i, X);
}

@@ -980,3 +991,3 @@ }

}
if (++i >= n) {
if (++i === 0 || i >= n) {
yield* a;

@@ -991,2 +1002,4 @@ return;

var a = Array.from(x);
if (a.length === 0)
return;
var n = n % a.length;

@@ -1023,3 +1036,6 @@ yield* a.slice(-n);

function* interleave(xs) {
var X = xs.length, ix = [];
var X = xs.length;
if (X === 0)
return;
var ix = [];
for (var i = 0; i < X; ++i)

@@ -1026,0 +1042,0 @@ ix[i] = xs[i][Symbol.iterator]();

{
"name": "extra-iterable",
"version": "3.0.117",
"version": "3.0.118",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc