npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ts-iterable-functions

v5.4.0

Published

[![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

Readme

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.