New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bentobots/list

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bentobots/list - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

2

package.json
{
"name": "@bentobots/list",
"description": "a collection of functions for lists",
"version": "0.0.11",
"version": "0.0.12",
"author": "John Rees <john@bitsushi.com>",

@@ -6,0 +6,0 @@ "repository": "https://github.com/bentobots/bentobots/tree/master/bots/list",

@@ -12,3 +12,7 @@ import loopifyInGroups, { loopifyInPairs } from "./loopify_in_groups";

const array = ["a", "b", "c"];
const result = [["a", "b"], ["b", "c"], ["c", "a"]];
const result = [
["a", "b"],
["b", "c"],
["c", "a"]
];
expect(loopifyInPairs(array)).toEqual(result);

@@ -20,3 +24,7 @@ expect(loopifyInGroups(2)(array)).toEqual(result);

const array = [["a"], "b", [["c"]]];
const result = [[["a"], "b"], ["b", [["c"]]], [[["c"]], ["a"]]];
const result = [
[["a"], "b"],
["b", [["c"]]],
[[["c"]], ["a"]]
];
expect(loopifyInPairs(array)).toEqual(result);

@@ -39,11 +47,21 @@ expect(loopifyInGroups(2)(array)).toEqual(result);

const array = ["a", "b", "c", "d", "e", "f"];
let result = [["a", "b", "c"], ["c", "d", "e"], ["e", "f", "a"]];
let result = [
["a", "b", "c"],
["c", "d", "e"],
["e", "f", "a"]
];
expect(loopifyInGroups(3, 1)(array)).toEqual(result);
result = [["a", "b", "c"], ["d", "e", "f"]];
result = [
["a", "b", "c"],
["d", "e", "f"]
];
expect(loopifyInGroups(3, 2)(array)).toEqual(result);
result = [["a", "b", "c"], ["e", "f", "a"]];
result = [
["a", "b", "c"],
["e", "f", "a"]
];
expect(loopifyInGroups(3, 3)(array)).toEqual(result);
});
});

@@ -8,3 +8,3 @@ /**

if (index < 0) {
return (arrayLength + index % arrayLength) % arrayLength;
return (arrayLength + (index % arrayLength)) % arrayLength;
} else if (index >= arrayLength) {

@@ -11,0 +11,0 @@ return index % arrayLength;

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