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

tarry

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tarry - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

5

index.d.ts

@@ -213,1 +213,6 @@ /**

export declare function groupSequential<T>(items: T[], areEqual?: (a: T, b: T) => boolean): T[][];
/**
Shuffle the array {xs} in-place, using the Durstenfeld variation on the
Fisher-Yates algorithm.
*/
export declare function shuffle<T>(xs: T[]): T[];

@@ -397,1 +397,19 @@ "use strict";

exports.groupSequential = groupSequential;
/**
Shuffle the array {xs} in-place, using the Durstenfeld variation on the
Fisher-Yates algorithm.
*/
function shuffle(xs) {
var n = xs.length;
var last = n - 1;
for (var i = 0; i < last; i++) {
// generate integer j such that 0 ≤ j < (n - i)
var j = Math.random() * (n - i) | 0;
// exchange xs[i] and xs[j]
var xs_i = xs[i];
xs[i] = xs[j];
xs[j] = xs_i;
}
return xs;
}
exports.shuffle = shuffle;

2

package.json
{
"name": "tarry",
"version": "0.3.1",
"version": "0.3.2",
"description": "Utility library for manipulating JavaScript Arrays",

@@ -5,0 +5,0 @@ "keywords": [

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