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

ngx-pure-pipes

v0.1.0

Published

A comprehensive collection of pure, standalone Angular pipes that bring operator-style functionality to your templates.

Readme

ngx-pure-pipes

A comprehensive collection of pure, standalone Angular pipes that bring operator-style functionality to your templates. Transform your template expressions into readable, testable, and reusable code while maintaining optimal performance and type safety.

npm version License: MIT Angular

✨ Features

  • Pure Pipes: Zero side effects with optimal change detection performance
  • Tree-shakeable: Import only what you need for minimal bundle size
  • Standalone: Modern Angular architecture with no NgModule dependencies
  • Type-safe: Full TypeScript support with strict typing
  • Operator-style: Intuitive naming that mirrors functional programming concepts
  • Template-friendly: Perfect companion for Angular's native control flow (@if, @for, @switch)

📦 Installation

npm install ngx-pure-pipes
# or
yarn add ngx-pure-pipes
# or
pnpm add ngx-pure-pipes

🚀 Quick Start

import { Component } from '@angular/core';
import { EqPipe, AndPipe, IsNilPipe, MapPipe } from 'ngx-pure-pipes';

@Component({
  selector: 'app-example',
  imports: [EqPipe, AndPipe, IsNilPipe, MapPipe],
  template: `
    <!-- Boolean logic -->
    @if ([user.isActive, user.isVerified] | and) {
    <span class="badge success">Verified User</span>
    }

    <!-- Comparisons -->
    <div [class.highlight]="status | eq : 'premium'">Premium Feature</div>

    <!-- Null checking -->
    @if (user.avatar | isNil) {
    <img src="/default-avatar.png" alt="Default Avatar" />
    }

    <!-- Array transformations -->
    @for (item of items | map:'name'; track item) {
    <li>{{ item }}</li>
    }
  `,
})
export class ExampleComponent {
  user = { isActive: true, isVerified: true, avatar: null };
  status = 'premium';
  items = [{ name: 'Apple' }, { name: 'Banana' }];
}

📚 Pipe Categories

🎯 Usage Patterns

With Angular Control Flow

@Component({
  template: `
    <!-- Conditional rendering -->
    @if (user.age | gte:18) {
      <adult-content></adult-content>
    }

    <!-- List rendering with transformations -->
    @for (item of items | filter:'active':true | sortBy:'name'; track item.id) {
      <item-card [data]="item"></item-card>
    }

    <!-- Switch statements -->
    @switch (user.role | lowerCase) {
      @case ('admin') { <admin-panel></admin-panel> }
      @case ('user') { <user-dashboard></user-dashboard> }
      @default { <guest-view></guest-view> }
    }
  `
})

With Reactive Forms

@Component({
  template: `
    <form [formGroup]="form">
      <input
        formControlName="email"
        [class.invalid]="form.get('email')?.errors | isTruthy"
      >

      @if (form.get('email')?.value | match:'@company.com') {
        <span class="corporate-badge">Corporate Account</span>
      }
    </form>
  `
})

Chaining Pipes

@Component({
  template: `
    <!-- Complex data transformations -->
    @for (
      item of users
        | filter:'active':true
        | sortBy:'lastLogin'
        | take:10
        | map:'displayName';
      track item
    ) {
      <user-item>{{ item }}</user-item>
    }
  `
})

🔧 Development

This project uses Nx for monorepo management.

# Build the library
nx build ngx-pure-pipes

# Run tests
nx test ngx-pure-pipes

# Run tests in watch mode
nx test ngx-pure-pipes --watch

# Lint the code
nx lint ngx-pure-pipes

# Generate documentation
nx build docs

📖 API Documentation

For detailed API documentation with examples, visit our documentation site.

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Guidelines

  • All pipes must be pure and standalone
  • Maintain strict TypeScript typing
  • Include comprehensive unit tests
  • Follow Angular coding standards
  • Update documentation for new features

📋 Requirements

  • Angular 20.1.0 or higher
  • TypeScript 5.0 or higher
  • RxJS 7.0 or higher (for async operations)

🗺️ Roadmap

  • v0.1: Core boolean and comparison pipes
  • v0.2: Array and string manipulation pipes
  • v0.3: Mathematical and aggregate operations
  • v0.4: Object manipulation utilities
  • v1.0: Stable API with full documentation

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Inspired by functional programming libraries like Lodash and Ramda
  • Built with Angular's modern standalone architecture
  • Designed for optimal performance with Angular's change detection

Made with ❤️ for the Angular community