extra-lists
Advanced tools
Comparing version 4.0.2 to 4.0.3
{ | ||
"name": "extra-lists", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "A collection of functions for operating upon Lists.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,5 +19,5 @@ A collection of functions for operating upon Lists.<br> | ||
This package is available in *Node.js* and *Web* formats. The web format | ||
is exposed as `extra_lists` standalone variable and can be loaded from | ||
[jsDelivr CDN]. | ||
This package is available in *Node.js* and *Web* formats. To use it on the web, | ||
simply use the `extra_lists` global variable after loading with a `<script>` | ||
tag from the [jsDelivr CDN]. | ||
@@ -33,20 +33,20 @@ > Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo). | ||
```javascript | ||
const lists = require('extra-lists'); | ||
// import * as lists from 'extra-lists'; | ||
// import * as lists from 'https://unpkg.com/extra-lists/index.mjs'; (deno) | ||
const xlists = require('extra-lists'); | ||
// import * as xlists from 'extra-lists'; | ||
// import * as xlists from 'https://unpkg.com/extra-lists/index.mjs'; (deno) | ||
var x = [['a', 'b', 'c', 'd', 'e'], [1, 2, 3, 4, 5]]; | ||
lists.filter(x, v => v % 2 === 1); | ||
xlists.filter(x, v => v % 2 === 1); | ||
// → [ [ 'a', 'c', 'e' ], [ 1, 3, 5 ] ] | ||
var x = [['a', 'b', 'c', 'd'], [1, 2, -3, -4]]; | ||
lists.some(x, v => v > 10); | ||
xlists.some(x, v => v > 10); | ||
// → false | ||
var x = [['a', 'b', 'c', 'd'], [1, 2, -3, -4]]; | ||
lists.min(x); | ||
xlists.min(x); | ||
// → -4 | ||
var x = [['a', 'b', 'c'], [1, 2, 3]]; | ||
[...lists.subsets(x)].map(a => [[...a[0]], [...a[1]]]); | ||
[...xlists.subsets(x)].map(a => [[...a[0]], [...a[1]]]); | ||
// → [ | ||
@@ -53,0 +53,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
80335