3 रिपॉजिटरी
Tests that a subject has specified properties, optionally matching each property value against a sub-pattern and collecting unmatched enumerable own properties with a rest pattern.
Distinct from Structural Pattern Matching: Distinct from Structural Pattern Matching: focuses on object property presence and value matching rather than AST code fragment matching.
Explore 3 awesome GitHub repositories matching programming languages & runtimes · Object Structure Matching. Refine with filters or upvote what's useful.
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
Matches object structures by property presence, sub-patterns, and rest collection.
Scala.js एक कंपाइलर और क्रॉस-प्लेटफॉर्म भाषा टूलचेन है जो Scala सोर्स कोड को JavaScript या WebAssembly में बदलता है। यह JavaScript इकोसिस्टम के लिए एक स्टेटिकली टाइप्ड टूल के रूप में कार्य करता है, जो वेब ब्राउज़र और Node.js वातावरण के लिए एप्लिकेशन्स के विकास को सक्षम बनाता है। यह प्रोजेक्ट एक JavaScript इंटरऑप फ्रेमवर्क के रूप में कार्य करता है, जो बाहरी लाइब्रेरीज़ और ग्लोबल ऑब्जेक्ट्स के साथ इंटरैक्ट करने के लिए टाइप-सेफ फेसेड्स और बाइंडिंग्स बनाने की अनुमति देता है। यह स्टेटिक और डायनामिक JavaScript इनवोकेशन दोनों के लिए मैकेनिज्म प्रदान करता है, जिसमें TypeScript बाइंडिंग्स का जनरेशन और बाहरी JavaScript कोड में उपयोग के लिए इंटरनल लॉजिक को एक्सपोर्ट करने की क्षमता शामिल है। टूलचेन में प्रोडक्शन बंडलिंग और आउटपुट ऑप्टिमाइज़ेशन के लिए एक फ्रंटएंड बिल्ड टूल शामिल है, जिसमें डेड कोड एलिमिनेशन और मॉड्यूल स्प्लिटिंग शामिल है। यह UI डेवलपमेंट के लिए DOM एलिमेंट टाइप चेकिंग, फुल-स्टैक डेवलपमेंट के लिए क्रॉस-प्लेटफॉर्म कोड शेयरिंग, और ऑप्टिमाइज़्ड बिल्ड आर्टिफैक्ट्स को सत्यापित करने के लिए विभिन्न टेस्टिंग फ्रेमवर्क्स सहित व्यापक क्षमताएं कवर करता है। संकलित (compiled) स्क्रिप्ट्स को JavaScript इंटरप्रेटर का उपयोग करके सीधे कमांड-लाइन वातावरण के भीतर निष्पादित किया जा सकता है।
Extracts values from nested data structures using pattern matching to replace traditional conditional logic.
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
Evaluates target objects against structural templates to extract inner values and execute corresponding handler functions conditionally.