mongez-supportive-is-recipes

Compose supportive-is predicates to validate inputs, merge data, and filter empties.

12|3|Updated Nov 29, 2017
One-click install
npx skills add https://github.com/hassanzohdy/supportive-is --skill mongez-supportive-is-recipes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mongez-supportive-is-recipes
Source: https://github.com/hassanzohdy/supportive-is/tree/main/skills/recipes
Command: npx skills add https://github.com/hassanzohdy/supportive-is --skill mongez-supportive-is-recipes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Form validation and data handling often require composing multiple predicates from @mongez/supportive-is to express complex rules. This Skill provides idiomatic recipes for combining predicates to validate inputs, merge structures correctly, and filter out empty values without sacrificing type safety.

Core Features & Use Cases

  • Compose predicates for form validation (e.g., isEmpty + isEmail + isUrl) to enforce required fields and format constraints.
  • Deep merge patterns that respect class instances by using isPlainObject to decide merge vs replace.
  • Filter out empty or null values from objects and arrays while preserving meaningful data (e.g., 0 and false).
  • Enable polymorphic argument handling and type narrowing hooks when integrating predicates into APIs.

Quick Start

Import the needed predicates from @mongez/supportive-is and begin applying the recipes to your forms, merges, and data filtering.

Frequently Asked Questions about mongez-supportive-is-recipes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compose multiple TypeScript predicates for form validation?

Compose multiple TypeScript predicates for form validation by combining supportive-is checks like isEmpty, isEmail, and isUrl to enforce required fields and format constraints without sacrificing type safety.

What is the best way to deep merge objects while preserving class instances in TypeScript?

Deep merge objects while preserving class instances by using the isPlainObject predicate to decide whether to recursively merge or replace values, ensuring class structures remain intact during data handling.

How do I filter empty values from objects and arrays while keeping false and zero?

Filter empty values from objects and arrays while keeping false and zero by composing supportive-is predicates to remove nulls and empties, preserving meaningful data during data cleansing workflows.

Can I use these predicate recipes in both frontend and backend TypeScript projects?

Use these predicate recipes in both frontend and backend TypeScript projects because they maintain zero runtime dependencies, offer predictable side-effect free exports, and support modular imports.

Does composing supportive-is predicates enhance type narrowing for API arguments?

Composing supportive-is predicates enhances type narrowing for API arguments by enabling polymorphic argument handling and type narrowing hooks when integrating predicate compositions into TypeScript APIs.

What are the limitations of using supportive-is predicate recipes for data cleansing?

Limitations of using supportive-is predicate recipes for data cleansing include their intermediate implementation depth, which focuses on idiomatic composition recipes rather than providing a heavy runtime validation framework.