0.11.0 • Published 9 months ago
@jasonsbarr/collections v0.11.0
@jasonsbarr/collections
Iterable collections in JavaScript with functionalities that far outstrip the native capabilities of JavaScript Arrays, Objects, Sets, and Maps.
Collections include:
- Dict - a hash table or dictionary-like data structure intended for use with single-type values
- List - a linked list using Array-based cells
- Nil - represents the empty List for safe use with what would otherwise be
null
andundefined
values - Range - if all you need is to iterate over a range of numbers, this is what you need
- Map - like native JavaScript Maps, but with additional methods and functionality
- Tuple - immutable, Array-like collection
- Set - Ordered collection of unique values based on structural (value) equality
- LinkedList - a doubly linked list using objects as nodes
Basic Usage
Import the collections you need and use as follows:
import { Tuple } from "@jasonsbarr/collections";
import { isOdd } from "@jasonsbarr/functional-core/lib/predicates/isOdd";
const nums = Tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
const evens = nums.reject(isOdd);
console.log(evens.inspect()); // -> Tuple(2, 4, 6, 8, 10)
Documentation
0.11.0
9 months ago
0.10.0
10 months ago
0.9.3
2 years ago
0.5.4
2 years ago
0.8.0
2 years ago
0.7.1
2 years ago
0.5.3
2 years ago
0.9.2
2 years ago
0.5.5
2 years ago
0.5.0
3 years ago
0.4.1
3 years ago
0.5.2
2 years ago
0.6.0
2 years ago
0.5.1
2 years ago
0.4.2
3 years ago
0.3.0
3 years ago
0.3.2
3 years ago
0.3.1
3 years ago
0.2.2
3 years ago
0.3.3
3 years ago
0.2.0
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago