New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ts-iterable-functions

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-iterable-functions

[![npm](https://img.shields.io/npm/v/ts-iterable-functions.svg?style=flat)](https://npmjs.org/package/ts-iterable-functions "View this project on npm") [![build](https://github.com/biggyspender/ts-iterable-functions/actions/workflows/ts-iterable-functions

latest
Source
npmnpm
Version
5.5.0
Version published
Maintainers
1
Created
Source

ts-iterable-functions

npm build TypeScript Coverage Bundle Size

Type-safe, LINQ-inspired iterable utilities for TypeScript and JavaScript, built for fluent composition and modern functional pipelines.

Highlights

  • Composable by default – every operator ships in source-first and pipe-first forms so you can pivot between array-style calls and unary pipelines without adapters.
  • Zero-dependency core – tiny footprint with native ESM and CJS bundles generated by esbuild for fast installs and rapid builds.
  • End-to-end type safety – aggressive generics keep key selectors, reducers, and joins fully inferred across long pipelines.
  • Drop-in LINQ ergonomics – familiar primitives like map, groupBy, orderBy, and zip behave the way seasoned C# and F# developers expect.
  • Pipe-friendly ecosystem – pairs naturally with ts-functional-pipe and other unary-first composition helpers.

Quick start

Install

npm install ts-iterable-functions ts-functional-pipe ts-equality-comparer ts-comparer-builder

Compose a strongly typed pipeline

import { pipeInto } from "ts-functional-pipe";
import { map, orderBy, thenBy, toArray } from "ts-iterable-functions";

const cars = [
  { manufacturer: "Ford", model: "Escort" },
  { manufacturer: "Ford", model: "Cortina" },
  { manufacturer: "Renault", model: "Clio" },
  { manufacturer: "Vauxhall", model: "Corsa" },
  { manufacturer: "Ford", model: "Fiesta" },
  { manufacturer: "Fiat", model: "500" },
];

const orderedCars = pipeInto(
  cars,
  orderBy((c) => c.manufacturer),
  thenBy((c) => c.model),
  toArray()
);

console.log(orderedCars);
// → deterministically ordered list with full type inference at every hop

Works great for

  • Data transformation pipelines in backends or frontends
  • Analytics dashboards and reporting utilities
  • Lightweight ETL tasks without pulling in stream frameworks
  • Crafting reusable collection helpers for design systems and SDKs
  • Replacing brittle nested loops with readable, testable pipelines

Pipe-first or source-first—your call

Every transformer is available as _operator(source, ...args) and operator(...args)(source).

import { _map, map, toArray } from "ts-iterable-functions";
import { pipeInto } from "ts-functional-pipe";

const numbers = [1, 2, 3];

const doubledLegacy = _map(numbers, (value) => value * 2);
const doubledPipeline = pipeInto(numbers, map((value) => value * 2), toArray());

Switching between forms keeps refactors painless while preserving full generic inference.

Core building blocks

Browse the full API reference in the online docs for detailed signatures and examples.

Plays nicely with ts-functional-pipe

  • Leverages pipe, pipeInto, and compose while preserving discriminated unions and narrowed types
  • Ships lightweight helpers like indexed, groupAdjacent, and fullOuterJoin that plug directly into unary pipelines

Learn more

Heads up: versions 5.x and later are bundled with esbuild and drop IE11 support.

🤝 Contributing and community

We welcome issues, feature ideas, and pull requests. Start a conversation in issues or discussions, and check CONTRIBUTING.md before raising a PR.

FAQs

Package last updated on 20 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts