Skip to content

API Reference

Complete API documentation for the Pools library.

Core Classes

  • Pool - Main class for managing data collections
  • Query - Query builder for filtering and sorting
  • Binder - Bind multiple pools together
  • Selectors - Built-in selection strategies

Types

typescript
// Entry wrapper
type PoolEntry<T> = {
	data: T;
	meta: Record<string, any>;
};

// Filter function
type Filter<T> = (entry: PoolEntry<T>) => boolean;

// Selector function
type Selector<T> = (entries: PoolEntry<T>[]) => PoolEntry<T> | null;

Quick Navigation

ClassDescription
PoolMain pool class with CRUD, Map-like operations, and events
QueryChainable query API for filtering and sorting
BinderCombine multiple pools for complex selections
SelectorsBuilt-in selectors: first, last, random, minBy, weighted