What problem does it solve?
This Skill addresses the common practice of using native JavaScript methods on collections and primitives, which can lead to null/undefined leaks and less composable code. It promotes a functional programming paradigm by replacing these with the Effect library's pipeable functions.
Core Features & Use Cases
- Safer Data Transformations: Utilizes Effect's
Array, Record, and String modules to perform operations like mapping, filtering, and grouping, returning Option types instead of potentially null/undefined values.
- Enhanced Composability: Encourages the use of
pipe and flow for building complex data processing pipelines in a declarative and readable manner.
- Type Safety: Leverages Effect's predicate functions (
P.isString, P.isNumber, etc.) for robust type guarding.
- Use Case: Refactor existing JavaScript codebases to adopt Effect's functional approach for data manipulation, improving code quality and reducing runtime errors.
Quick Start
Use the effect-data skill to refactor the provided array filtering logic to use Effect's pipe and A.filter.