Join (SQL-like) two iterables by a common key. v4.0.0 is the current stable version, ESM-only, requires Node >=22. Provides INNER JOIN, LEFT JOIN, and FULL JOIN operations on iterables. The user supplies key extractors and a result constructor. v3 introduced a simplified interface and up to 10x performance improvement. v3 dropped custom match functions and made all parameters required. v4 dropped CJS support and raised minimum Node version. Key differentiator: lightweight, typed (TypeScript), and fast for object array joins without a database.
npm install array-joinNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows INNER JOIN of two arrays by matching id and personId, combining properties.
Switch to import syntax. If using Node, set type: module in package.json or use .mjs extension.
Upgrade Node.js to >=22.
Provide all four functions: leftKey, rightKey, resultItem.
Choose the correct function based on desired join semantics.
Ensure keys are primitives (string, number, symbol, boolean, undefined, null).
Use import syntax: import { join } from 'array-join'Provide all three function arguments.
Pass only arrays or other iterables (e.g. Set, Map values).
No dependency data recorded yet.