extra-iterable
Advanced tools
Comparing version 3.2.14 to 3.2.15
{ | ||
"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 @@ ``` |
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
130359