Hand-picked open source object destructuring patterns for cleaner JavaScript. Compare the top repositories and find the right one.
This is a TC39 proposal to add declarative pattern matching syntax to the ECMAScript language. It introduces a match expression that allows developers to inspect and branch on data structures using patterns with destructuring, guards, and logical combinators. The proposal defines a custom matcher protocol via a well-known symbol, enabling objects to implement user-defined matching logic with arbitrary extraction and decomposition. The proposal supports matching against literal primitives using SameValue equality with special handling for signed zero and NaN, as well as relational comparison
This proposal introduces native pattern matching syntax to JavaScript, enabling structured destructuring, guards, and data transformation directly within the language.
Z is a pattern matching library for JavaScript that evaluates variables against structural shapes, data types, and literal values to branch program execution conditionally. It functions as a functional programming utility designed to deconstruct arrays and objects into parts during conditional evaluation. The library transforms human-friendly pattern matching syntax into optimized nested conditional statements during compilation or initialization phases, evaluating complex structural conditions and returning matching branch results directly as standard expression values. It inspects runtime d
This library provides pattern matching for JavaScript with functional programming support, though it lacks explicit native support for nested object destructuring and default values.