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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@josee9988/filter-pipe-ngx

v1.1.0

Published

Angular universal pipe to filter arrays of objects. Ignores accent marks and upper/lowercase characters.

Downloads

16

Readme

FilterPipeNgx for angular universal

Simple angular pipe that allows you to filter arrays of objects and simple arrays by a given text.

This angular universal filter pipe is able to filter by any field in your array of objects and can even ignore the accent marks or upercase/lowercase text.

Originally filter pipe based on solodynamo/ng2-search-filter, please do check his project.

Version Downloads License Vulnerabilities npm bundle size (scoped version) Node.js CI


Installation

  1. Install the pipe to your project.

    npm i @josee9988/filter-pipe-ngx --save
  2. Import the pipe to your app.module.ts.

    import {FilterModule} from '@josee9988/filter-pipe-ngx';
  3. Declare and initialize the pipe to your project.

    // rest of your imports here...
       
    @NgModule({
      imports: [ // in the imports section
        FilterModule, // add the pipe to your declarations
        // rest of the code ...

Examples of use

Example of other integration in another web.

Stackblitz example

Check the stackblitz example or simply click the above image!

Direct component example

import {Component} from '@angular/core';

@Component({
  selector: 'app-example-filter-pipe-products',
  template: `
<!-- Input in which you will filter your products (you array) -->
<input type="text" [(ngModel)]="searchText">

<!-- Display your data and filter it by your input -->
<div *ngFor = "let arrayItem of yourArrayToBeFiltered | filterPipe:searchText">

    <!-- Every object that matches the filter (if there is any filter) will be shown -->
  <p>Name: {{arrayItem.name}}, Inventory: {{arrayItem.inventory}}, price: {{arrayItem.price}}</p>

</div>`
})

export class ExampleFilterPipeProducts {
  yourArrayToBeFiltered: any[] = [
   {name: 'chair', inventory: 5, price: 45.99},
   {name: 'table', inventory: 10, price: 123.75},
   {name: 'sofa', inventory: 2, price: 399.50},
   {name: 'bed', inventory: 4, price: 592.12}];
  searchText: string;
}

For deeper information about angular pipes check the oficial documentation.


Contributing

This project is actively looking for new contributors to develop new functions, maintain and improve the project. If you are interested make sure to fork the project and pull-request your improvements to be added as a contributor!


Did you enjoyed the package? Help us raise these numbers!

Github followers Github stars Github watchers Github forks

Check the npm page with the package.


Made with a lot of ❤️❤️ by @Josee9988