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

typed-linq

v1.0.2

Published

Powerful LINQ-inspired extensions for Array.prototype with full TypeScript support.

Readme

typed-linq

Powerful LINQ-inspired extensions for Array.prototype with full TypeScript support.

TypeScript License: MIT

tsinq brings the elegance of LINQ to JavaScript and TypeScript by extending Array.prototype with a rich collection of strongly typed, immutable and expressive utility methods.

Designed to feel natural for developers coming from C#, while embracing modern TypeScript best practices.


Features

  • 🚀 LINQ-inspired API
  • 🔒 Fully typed
  • ⚡ Zero runtime dependencies
  • ♻️ Immutable operations
  • 📦 Lightweight
  • 🧪 Thoroughly tested
  • ❤️ Designed for TypeScript-first projects

Installation

npm install typed-linq

Usage

Simply import the library once during your application startup.

import 'typed-linq'

That's it.

Every array now has access to the additional methods.


Examples

Filtering

const adults = users.where(x => x.age >= 18)

Projection

const names = users.select(x => x.name)

Ordering

const ordered = users
    .orderBy(x => x.lastName)
    .thenBy(x => x.firstName)

Aggregation

const total = orders.sum(x => x.price)

const average = orders.average(x => x.price)

const highest = orders.max(x => x.price)

Element Retrieval

const first = users.first()

const admin = users.first(x => x.role === 'admin')

const last = users.last()

const only = users.single(x => x.id === id)

Grouping

const grouped = users.groupBy(x => x.country)

Set Operations

const unique = users.distinctBy(x => x.id)

const common = listA.intersect(listB)

const merged = listA.union(listB)

Partitioning

const firstTen = items.take(10)

const remaining = items.skip(10)

const chunks = items.chunk(100)

Conversion

const map = users.toMap(x => x.id)

const dictionary = users.toDictionary(x => x.id)

const object = users.toObject(x => x.id)

const set = users.toSet()

Collection Modification

const updated = users
    .append(newUser)
    .remove(oldUser)
    .replace(oldUser, newUser)

Randomization

const item = users.random()

const shuffled = users.shuffle()

const sample = users.sample(5)

Available Categories

  • Filtering
  • Projection
  • Quantifiers
  • Element Retrieval
  • Ordering
  • Aggregation
  • Set Operations
  • Partitioning
  • Grouping
  • Conversion
  • Collection Modification
  • Randomization
  • Utility Helpers

Design Goals

tsinq follows a few simple principles:

  • Strong TypeScript support
  • Predictable behavior
  • Immutable by default
  • Familiar LINQ-inspired syntax
  • No runtime dependencies
  • Readability over cleverness
  • Performance-oriented implementations

TypeScript Support

The library provides full TypeScript declarations.

Methods are available directly on every array after importing the package.

import 'tsinq'

const result = [1, 2, 3]
    .where(x => x > 1)
    .select(x => x * 2)

Type inference is preserved across the entire chain.


Compatibility

  • Node.js 18+
  • TypeScript 5+
  • Modern browsers
  • ESM

Documentation

More detailed documentation, examples and API reference are planned for future releases.


Contributing

Contributions are welcome.

Please read the CONTRIBUTING.md file before opening a pull request.


License

Released under the MIT License.