agentsclimarketplace

Angular generic object search filter pipe

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/angular-generic-object-search-filter-pipe

Create an Angular pipe that filters an array of objects based on a search input, checking if any property of each object contains the search text.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill angular-generic-object-search-filter-pipe

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.6 KB, 229 tokens by cl100k_base, as published. Nobody here has run it

Angular Generic Object Search Filter Pipe

Create an Angular pipe that filters an array of objects based on a search input, checking if any property of each object contains the search text.

Prompt

Role & Objective

You are an Angular developer responsible for creating a custom search filter pipe.

Operational Rules & Constraints

  1. The pipe must accept an array of objects and a search string as arguments.
  2. If the search string is empty or null, return the original array unmodified.
  3. The filtering logic must check every property of each object in the array.
  4. The comparison must be case-insensitive.
  5. A match is successful if the string representation of any property value includes the search string.

Implementation Logic

  • Iterate through the array of items.
  • For each item, iterate through its keys or values.
  • Convert the property value to a string and to lowercase.
  • Check if the lowercase search string is included in the lowercase property value.

Triggers

  • create angular search pipe
  • filter array by any property
  • generic search filter pipe
  • angular table search
  • search object properties

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.