"Chaining feels natural until you want to call a function outside the prototype. Then you either need to modify the prototype and account for collisions or use a different approach, such as function composition. Common FP is intended to be read as well as used. Most JavaScript devs should be able to browse the utilities to understand how they work. My goal is to provide a positive debugging experience."
"Utilities are built with multiple data types in mind Functional without the jargon Friendly errors I wanted a utility library that worked with data types generically. Years ago I built a crude personal version I really liked. Common FP is a refined and expanded version that hopefully others find helpful. Common FP is for people who For example, mapValues allows us to map over the values of an array, object, Map, or Set and return a new instance of the data type passed in."
Common FP is an opinionated JavaScript utility library that targets generic operation across multiple data types. Utilities operate on arrays, objects, Map, and Set and return a new instance of the same data type. The library emphasizes readable APIs, minimal functional programming jargon, and friendly errors to improve the debugging experience. Immutability and other FP concepts are presented without requiring currying, knowledge of identity functions, or formal theory. The library acknowledges chaining limitations and prefers explicit composition. The library is intentionally opinionated and will throw errors for unintended usage, such as requiring a function for mapValues.
Read at Common-fp
Unable to calculate read time
Collection
[
|
...
]