Skip to content

Collections

The Collections module has a variety of data-structures to supplement those already available in the web platform.

Data structures

In brief:

  • Queue: first-in, first-out ranked data. Like the queue at a bakery
  • Stack: first-in, last-out ranked data. Like a stack of plates, you can’t just grab the one at the bottom
  • Set: unique data
  • Map: relate keys with values, like a dictionary
  • Tree: structured data of parents and children
  • Graph: relations

Importing

// Whole module
import * as Collections from "ixfx/collections.js"
// Single function
import { circularArray } from "ixfx/collections.js"
// One of several modules
import { Collections, Modulation, Flow, Data } from "ixfx/bundle.js"
// And within your HTML's <HEAD> </HEAD> block:
// <script type="importmap">{ "imports": { "ixfx/": "/ixfx/" } } </script>