modern-javascript-patterns

Modernize JavaScript code with ES6+ syntax and functional patterns.

Updated May 16, 2026
One-click install
npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill modern-javascript-patterns-p-o-ke-nae
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modern-javascript-patterns
Source: https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory/tree/main/.github/skills/modern-javascript-patterns
Command: npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill modern-javascript-patterns-p-o-ke-nae

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you replace verbose or outdated JavaScript with clearer, safer, and more maintainable modern syntax so code is easier to read, test, and evolve.

Core Features & Use Cases

  • Modern Syntax: Use arrow functions, destructuring, spread and rest, template literals, optional chaining, and nullish coalescing to simplify everyday code.
  • Async Workflows: Structure promises, async and await, retries, timeouts, and concurrent execution for reliable asynchronous logic.
  • Functional Patterns: Apply map, filter, reduce, composition, currying, memoization, and immutability to transform data cleanly.
  • Use Case: Refactor a callback-heavy utility into modular, promise-based code with immutable data updates and better error handling.

Quick Start

Ask for a refactor plan that converts your JavaScript example into modern ES6+ syntax with async and await, destructuring, and functional patterns.

Frequently Asked Questions about modern-javascript-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor legacy JavaScript code to use modern ES6+ syntax?

To refactor legacy JavaScript to modern ES6+ syntax, replace verbose patterns with arrow functions, destructuring, spread and rest operators, and template literals to improve code readability and maintainability.

What is the best way to structure async workflows using promises and async await?

The best way to structure async workflows is using promises, async and await, alongside structured retries, timeouts, and concurrent execution logic to ensure reliable asynchronous operations and better error handling.

How do I apply functional programming patterns to transform data in JavaScript?

Applying functional programming patterns in JavaScript involves using map, filter, reduce, composition, currying, memoization, and immutability to cleanly transform data without mutating the original state.

Can I convert a callback-heavy JavaScript utility into modular, promise-based code?

Yes, you can convert callback-heavy JavaScript utilities into modular, promise-based code by implementing async and await, applying destructuring, and ensuring immutable data updates for safer execution.

When should I use optional chaining and nullish coalescing in JavaScript?

Use optional chaining and nullish coalescing in JavaScript to safely access nested object properties and provide default values, preventing runtime errors when dealing with null or undefined data structures.

Does modern JavaScript refactoring support iterators and generators for data flows?

Yes, modern JavaScript refactoring supports iterators and generators to manage data flows, alongside classes and immutable data transformations, to build reusable modules and improve application performance.