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.2.14 to 3.2.15

2

package.json
{
"name": "extra-iterable",
"version": "3.2.14",
"version": "3.2.15",
"description": "A collection of functions for operating upon iterables.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,20 +28,20 @@ A collection of functions for operating upon iterables.<br>

```javascript
const xiterable = require('extra-iterable');
// import * as xiterable from "extra-iterable";
// import * as xiterable from "https://unpkg.com/extra-iterable/index.mjs"; (deno)
const iterable = require('extra-iterable');
// import * as iterable from "extra-iterable";
// import * as iterable from "https://unpkg.com/extra-iterable/index.mjs"; (deno)
var x = [2, 4, 6, 8];
xiterable.get(x, 1);
iterable.get(x, 1);
// → 4
var x = [1, 2, 3, 4];
[...xiterable.swap(x, 0, 1)];
[...iterable.swap(x, 0, 1)];
// → [ 2, 1, 3, 4 ]
var x = [1, 2, 3];
[...xiterable.cycle(x, 0, 4)];
[...iterable.cycle(x, 0, 4)];
// → [1, 2, 3, 1]
var x = [1, 2, 3, 4];
xiterable.reduce(x, (acc, v) => acc+v);
iterable.reduce(x, (acc, v) => acc+v);
// → 10

@@ -48,0 +48,0 @@ ```

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