For object destructuring patterns, the strongest matches are tc39/proposal-pattern-matching (This proposal introduces native pattern matching syntax to JavaScript), z-pattern-matching/z (This library provides pattern matching for JavaScript with functional) and evhub/coconut (Coconut is a functional programming language that compiles to). lukehoban/es6features and hsutter/cppfront round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
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.
Coconut is a functional programming language that compiles to Python. It functions as a source-to-source compiler, translating high-level functional syntax into compatible Python code to maintain runtime compatibility. The language introduces a logic system for pattern matching and destructuring complex data structures. It provides a mechanism for tail call optimization to prevent stack overflow errors during deep recursive function calls and employs a lazy evaluation engine to defer computations until results are explicitly required. The project includes support for algebraic data types, pi
Coconut is a functional programming language that compiles to Python and includes pattern matching capabilities, but it is a transpiler rather than a JavaScript-focused object destructuring library or reference tool.
This project is a comprehensive reference guide and technical documentation for the features, syntax updates, and APIs introduced in ECMAScript 6. It serves as a language specification and overview for modern JavaScript development. The guide covers a wide range of language enhancements, including the implementation of classes and prototype-based inheritance, the use of arrow functions for lexical scope binding, and the introduction of block-scoped variables. It details the module system for organizing independent code components via import and export statements. The documentation extends to
This repository provides a general reference guide and documentation for ECMAScript 6 features, but it lacks dedicated libraries or parsing tools for object destructuring and pattern matching.
cppfront is a C++ language extension frontend and source-to-source translator. It functions as a syntax transformer that converts experimental language extensions into standard compliant C++ code, allowing for the prototyping of new language features within existing build systems. The project provides a translation layer that adds support for pattern matching, contracts, and string interpolation. It includes a metaprogramming tool for compile-time reflection and automated code generation using specialized metafunctions. The system automates several development tasks, including the resolution
Although it includes experimental pattern matching features, cppfront is a C++ source-to-source translator rather than a general object destructuring and pattern matching utility for JavaScript or runtime data structures.
Rust is a programming language designed for memory safety and performance. It provides a comprehensive curriculum that covers fundamental syntax, memory management, and advanced programming paradigms, including support for functional and object-oriented styles. The language features a strong type system that enforces memory safety through ownership, borrowing, and lifetime annotations, while also offering mechanisms for handling both recoverable and unrecoverable errors. The language includes extensive support for concurrent programming, providing primitives for thread management, shared-stat
This repository is a general-purpose systems programming language compiler rather than a dedicated library or parsing tool for object destructuring, making it a foundational tool rather than a direct match for the requested utilities.
This project is an ECMAScript 2015 reference guide and JavaScript language cheat sheet. It provides a concise summary of the language specifications, syntax updates, and new features introduced in the 2015 standard. The guide serves as a technical overview of modern language patterns used to manage modular code structures and asynchronous operations. It functions as a reference for implementing current coding standards and studying core updates to the language. The content covers a wide range of capabilities, including asynchronous programming, object modeling, and module management. It deta
This repository is a general reference guide and cheat sheet for ECMAScript 2015 syntax rather than an active library or parsing tool specifically dedicated to object destructuring and pattern matching.
Roc is a statically typed, functional programming language built around immutable-by-default semantics, exhaustive pattern matching on tag unions, and a type system that combines optional explicit annotations with full compile-time type inference. Its core identity centers on correctness and expressiveness, using tagged unions for error handling with a question-mark operator for early error propagation, and a trailing-bang naming convention that makes side-effect boundaries syntactically visible at every call site. The language distinguishes itself through a platform-based I/O abstraction tha
Roc is a statically typed functional programming language featuring pattern matching and record operations, but it is an entire language implementation rather than a library or parsing tool specifically for object destructuring.
Reason is a strongly typed functional language and multi-target compiler designed to produce either JavaScript for web environments or native machine code for operating systems. It serves as an OCaml-compatible language that shares an abstract syntax tree with OCaml, providing a practical syntax for the OCaml ecosystem. The project functions as a type-safe frontend language, incorporating JSX support to build user interfaces through structural elements that translate into type-safe function calls. It enables deep integration with the JavaScript ecosystem, allowing the use of existing librarie
Reason is a strongly typed functional programming language with built-in pattern matching and OCaml compatibility, but it is a full language and compiler rather than a targeted object destructuring library or utility.
PureScript is a statically typed, purely functional programming language that compiles to JavaScript. It is designed as a cross-platform frontend language for building safe web applications, utilizing a static type system and a JavaScript compiler to ensure program correctness across browser and server environments. The language is distinguished by its emphasis on mathematical purity, featuring a robust type system with first-class support for monads. It provides a sophisticated toolset for static verification, including algebraic data types, type classes, and automatic type inference to reje
PureScript is a strongly-typed functional programming language rather than a targeted object destructuring or pattern matching utility, though its type system does support algebraic data types and pattern matching natively.
ESTree is a formal schema and set of object interfaces used to represent JavaScript source code as a standardized abstract syntax tree. It serves as a common tree format and parser standard to ensure interoperability between different JavaScript parsers and transformation tools. The specification provides a consistent way to model language constructs, including statements, expressions, and module declarations. It includes detailed representations for modern language features such as classes, private identifiers, and short-circuiting logic like nullish coalescing and optional chaining. The pr
This specification defines a standardized abstract syntax tree format for JavaScript source code rather than serving as a destructuring utility or parsing library for object patterns.
This project is a command-line processor designed for the parsing, filtering, and transformation of structured data streams. It functions as a declarative programming environment that treats data as immutable streams, allowing users to perform complex structural modifications through the composition of small, reusable functions. By utilizing a recursive tree traversal engine, the system enables the navigation, inspection, and modification of deeply nested hierarchical data structures. The engine distinguishes itself through a stream-oriented architecture that processes input records one by on
This command-line data processor handles JSON parsing, filtering, and transformation streams, which makes it a powerful data manipulation tool but not a dedicated library or reference material for object destructuring.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| tc39/proposal-pattern-matching | 5.8K | HTML | MIT | |
| z-pattern-matching/z | 1.7K | JavaScript | Apache-2.0 | |
| evhub/coconut | 4.3K | Python | Apache-2.0 | |
| lukehoban/es6features | 29.1K | — | MIT | |
| hsutter/cppfront | 6K | C++ | NOASSERTION | |
| rust-lang/rust | 114.1K | Rust | Apache-2.0 | |
| bevacqua/es6 | 4.3K | — | MIT | |
| roc-lang/roc | 5.7K | Zig | UPL-1.0 | |
| reasonml/reason | 10.3K | OCaml | MIT | |
| purescript/purescript | 8.8K | Haskell | other |