Gathering detailed insights and metrics for extra-ilists
Gathering detailed insights and metrics for extra-ilists
Gathering detailed insights and metrics for extra-ilists
Gathering detailed insights and metrics for extra-ilists
extra-ilists.web
ILists is a pair of key iterable list and value iterable list, with unique keys {web}.
extra-array
An array is a collection of values, stored contiguously.
extra-array.web
An array is a collection of values, stored contiguously {web}.
extra-sorted-array.web
A sorted array is a collection of values, arranged in an order {web}.
ILists is a pair of key iterable list and value iterable list, with unique keys.
npm install extra-ilists
Typescript
Module System
Node Version
NPM Version
75.1
Supply Chain
99.4
Quality
76
Maintenance
100
Vulnerability
100
License
TypeScript (88.8%)
JavaScript (11.2%)
Total Downloads
2,305
Last Day
2
Last Week
54
Last Month
103
Last Year
611
142 Commits
2 Watching
2 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
3.1.17
Package Id
extra-ilists@3.1.17
Unpacked Size
79.12 kB
Size
16.03 kB
File Count
6
NPM Version
9.5.0
Node Version
18.15.0
Publised On
14 Apr 2023
Cumulative downloads
Total Downloads
Last day
-66.7%
2
Compared to previous day
Last week
237.5%
54
Compared to previous week
Last month
33.8%
103
Compared to previous month
Last year
-63.9%
611
Compared to previous year
ILists is a pair of key iterable list and value iterable list, with unique keys.
📦 Node.js,
🌐 Web,
📜 Files,
📰 Docs,
📘 Wiki.
As mentioned above, ILists is a data structure that consists of a pair of iterable lists, one for keys and one for values. The keys are unique, meaning there are no duplicate entries. ILists is an iterable version of Lists. Use it when you don't have the keys and values as Arrays.
This package includes functions that allow you to query about, generate,
compare, and manipulate the data within the ILists. You can find out its
size, add and remove entries, obtain its properties, get parts or
subsets of the data, find specific entries within it, perform functional
operations, combine ILists or its sub-entries, or perform set operations
upon it. Except fromEntries()
, all functions take ILists as their first
parameter.
This package is available in Node.js and Web formats. To use it on the web,
simply use the extra_ilists
global variable after loading with a <script>
tag
from the jsDelivr CDN.
Stability: Experimental.
1const xilists = require('extra-ilists'); 2// import * as xilists from 'extra-ilists'; 3// import * as xilists from 'https://unpkg.com/extra-ilists/index.mjs'; (deno) 4 5var x = [['a', 'b', 'c', 'd', 'e'], [1, 2, 3, 4, 5]]; 6xilists.filter(x, v => v % 2 === 1); 7// → [ [ 'a', 'c', 'e' ], [ 1, 3, 5 ] ] 8 9var x = [['a', 'b', 'c', 'd'], [1, 2, -3, -4]]; 10xilists.some(x, v => v > 10); 11// → false 12 13var x = [['a', 'b', 'c', 'd'], [1, 2, -3, -4]]; 14xilists.min(x); 15// → -4 16 17var x = [['a', 'b', 'c'], [1, 2, 3]]; 18[...xilists.subsets(x)].map(a => [[...a[0]], [...a[1]]]); 19// → [ 20// → [ [], [] ], 21// → [ [ 'a' ], [ 1 ] ], 22// → [ [ 'b' ], [ 2 ] ], 23// → [ [ 'a', 'b' ], [ 1, 2 ] ], 24// → [ [ 'c' ], [ 3 ] ], 25// → [ [ 'a', 'c' ], [ 1, 3 ] ], 26// → [ [ 'b', 'c' ], [ 2, 3 ] ], 27// → [ [ 'a', 'b', 'c' ], [ 1, 2, 3 ] ] 28// → ]
Property | Description |
---|---|
is | Check if value is ilists. |
keys | List all keys. |
values | List all values. |
entries | List all key-value pairs. |
fromEntries | Convert ilists to entries. |
size | Find the size of ilists. |
isEmpty | Check if ilists is empty. |
compare | Compare two ilists. |
isEqual | Check if two ilists are equal. |
get | Get value at key. |
getAll | Gets values at keys. |
getPath | Get value at path in nested ilists. |
hasPath | Check if nested ilists has a path. |
set | Set value at key. |
swap | Exchange two values. |
remove | Remove value at key. |
head | Get first entry from ilists (default order). |
tail | Get ilists without its first entry (default order). |
take | Keep first n entries only (default order). |
drop | Remove first n entries (default order). |
count | Count values which satisfy a test. |
countAs | Count occurrences of values. |
min | Find smallest value. |
minEntry | Find smallest entry. |
max | Find largest value. |
maxEntry | Find largest entry. |
range | Find smallest and largest values. |
rangeEntries | Find smallest and largest entries. |
subsets | List all possible subsets. |
randomKey | Pick an arbitrary key. |
randomValue | Pick an arbitrary value. |
randomEntry | Pick an arbitrary entry. |
randomSubset | Pick an arbitrary subset. |
has | Check if ilists has a key. |
hasValue | Check if ilists has a value. |
hasEntry | Check if ilists has an entry. |
hasSubset | Check if ilists has a subset. |
find | Find first value passing a test (default order). |
findAll | Find values passing a test. |
search | Finds key of an entry passing a test. |
searchAll | Find keys of entries passing a test. |
searchValue | Find a key with given value. |
searchValueAll | Find keys with given value. |
forEach | Call a function for each value. |
some | Check if any value satisfies a test. |
every | Check if all values satisfy a test. |
map | Transform values of entries. |
reduce | Reduce values of entries to a single value. |
filter | Keep entries which pass a test. |
filterAt | Keep entries with given keys. |
reject | Discard entries which pass a test. |
rejectAt | Discard entries with given keys. |
flat | Flatten nested ilists to given depth. |
flatMap | Flatten nested ilists, based on map function. |
zip | Combine matching entries from all ilists. |
partition | Segregate values by test result. |
partitionAs | Segregate entries by similarity. |
chunk | Break ilists into chunks of given size. |
concat | Append entries from all ilists, preferring last. |
join | Join ilists together into a string. |
isDisjoint | Check if ilists have no common keys. |
unionKeys | Obtain keys present in any ilists. |
union | Obtain entries present in any ilists. |
intersection | Obtain entries present in both ilists. |
difference | Obtain entries not present in another ilists. |
symmetricDifference | Obtain entries not present in both ilists. |
No vulnerabilities found.
No security vulnerabilities found.