modern-javascript-patterns
यह क्या करती है
यह गाइड सिखाती है कि JavaScript के नए वर्शन (जिन्हें ES6+ कहा जाता है) का इस्तेमाल करके कोड को साफ, तेज़ और आसानी से समझ आने लायक कैसे लिखें। इसमें 'async/await' और 'destructuring' जैसे फीचर शामिल हैं।
कब इस्तेमाल करें
- ✓जब आपके पास पुराना JavaScript कोड हो और आप उसे अपडेट करना चाहते हों।
- ✓जब आप कोड को ज़्यादा व्यवस्थित और पढ़ने में आसान बनाना चाहते हों।
- ✓जब आपको समय लेने वाले काम संभालने हों, जैसे इंटरनेट से डेटा लाना।
Skill का लिंक
https://github.com/wshobson/agents/blob/main/plugins/javascript-typescript/skills/modern-javascript-patterns/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं इस पुराने JavaScript कोड को नए फीचर इस्तेमाल करने के लिए कैसे अपडेट करूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI गाइड की सर्वोत्तम प्रथाओं (best practices) और उदाहरणों का इस्तेमाल करके दिखाता है कि आपके कोड को कैसे दोबारा लिखा जाए। इसमें ज़ोर इस बात पर है कि नए JavaScript फीचर से कोड ज़्यादा कुशल और पढ़ने में आसान बने।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Modern JavaScript Patterns
Comprehensive guide for mastering modern JavaScript (ES6+) features, functional programming patterns, and best practices for writing clean, maintainable, and performant code.
When to Use This Skill
- Refactoring legacy JavaScript to modern syntax
- Implementing functional programming patterns
- Optimizing JavaScript performance
- Writing maintainable and readable code
- Working with asynchronous operations
- Building modern web applications
- Migrating from callbacks to Promises/async-await
- Implementing data transformation pipelines
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
- Use const by default: Only use let when reassignment is needed
- Prefer arrow functions: Especially for callbacks
- Use template literals: Instead of string concatenation
- Destructure objects and arrays: For cleaner code
- Use async/await: Instead of Promise chains
- Avoid mutating data: Use spread operator and array methods
- Use optional chaining: Prevent "Cannot read property of undefined"
- Use nullish coalescing: For default values
- Prefer array methods: Over traditional loops
- Use modules: For better code organization
- Write pure functions: Easier to test and reason about
- Use meaningful variable names: Self-documenting code
- Keep functions small: Single responsibility principle
- Handle errors properly: Use try/catch with async/await
- Use strict mode:
'use strict'for better error catching
For common pitfalls (this binding, promise anti-patterns, memory leaks), see references/advanced-patterns.md.
अक्सर पूछे जाने वाले सवाल
'ES6+' क्या है?
ये JavaScript भाषा के नए वर्शन हैं, जिनमें कई सुधार और नए फीचर आए हैं ताकि प्रोग्रामर का काम आसान हो।
'async/await' क्या है?
यह समय लेने वाले कामों, जैसे इंटरनेट से जानकारी डाउनलोड करना, को संभालने का एक आसान तरीका है। इससे बाकी प्रोग्राम रुकता नहीं है।
'refactoring code' का क्या मतलब है?
Refactoring का मतलब है मौजूदा कोड को बेहतर बनाने के लिए दोबारा लिखना, बिना इस बात को बदले कि वह क्या करता है। यह घर की सफाई करने जैसा है, जिसमें फर्नीचर इधर-उधर किए बिना चीज़ें व्यवस्थित की जाती हैं।
जानकारी
लेखक का मूल विवरण
Master ES6+ features including async/await, destructuring, spread operators, arrow functions, promises, modules, iterators, generators, and functional programming patterns for writing clean, efficient JavaScript code. Use when refactoring legacy code, implementing modern patterns, or optimizing JavaScript applications.
repo: wshobson/agents
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6713
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
screen-reader-testing
41kआपके एजेंट को screen readers का इस्तेमाल करके वेबसाइटों की जांच करने देता है, ताकि यह पक्का हो सके कि वे accessible हैं।
wcag-audit-patterns
41kआपके एजेंट को वेबसाइटों का accessibility audit करने और WCAG guidelines के हिसाब से समस्याएं ठीक करने में मदद करता है।
multi-reviewer-patterns
41kआपके एजेंट को कई code reviews को एक साथ चलाने देता है। यह एक जैसे findings हटाता है और सारी रिपोर्ट को एक जगह जोड़ता है।
parallel-debugging
41kआपके एजेंट को parallel जांच के साथ जटिल समस्याओं को debug करने और root cause analysis में मदद करता है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।