Modernize and Optimize JavaScript Code
JavaScript expert skill for modern ES6+ and async patterns across Node.js and browsers, with error handling and testing.
Why it matters
Transform your JavaScript codebase into modern, efficient, and robust applications. This skill specializes in leveraging ES6+ features and advanced async patterns for both Node.js and browser environments.
Outcomes
What it gets done
Migrate legacy JavaScript to modern ES standards.
Debug complex asynchronous behavior and event loops.
Optimize JavaScript performance and ensure cross-browser compatibility.
Implement robust error handling and write effective tests.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-javascript-pro | bash Overview
Javascript Pro
Covers modern JavaScript development across Node.js and browsers: ES6+ features, async/await and generator patterns, event loop behavior, and cross-browser compatibility. Use when building or debugging modern async JavaScript, not for TypeScript architecture or backend design decisions.
What it does
A JavaScript expert skill for modern JS and async programming across Node.js and browser runtimes. Focus areas: ES6+ features (destructuring, modules, classes), async patterns (promises, async/await, generators), event loop and microtask queue behavior, Node.js APIs and performance optimization, browser APIs and cross-browser compatibility, and TypeScript migration and type safety. Its approach prefers async/await over raw promise chains, applies functional patterns where they fit, handles errors at the right boundaries rather than swallowing them globally, avoids callback hell with modern control flow, and weighs bundle size for browser-targeted code.
When to use - and when NOT to
Use when building modern JavaScript for Node.js or the browser, debugging async behavior, event-loop timing, or performance issues, or migrating legacy JS to current ES standards. Not for TypeScript architecture decisions, which need a dedicated TypeScript skill, non-JS runtimes, or backend architecture decisions beyond the JavaScript code itself - those are explicitly out of scope.
Inputs and outputs
Input is the runtime targets (Node.js, browser, or both) and any constraints on module system or compatibility. Output is modern JavaScript with proper error handling, async code with race-condition prevention, a clean module structure with explicit exports, Jest tests covering async patterns, performance profiling results, and a polyfill strategy where browser compatibility requires one, all documented with JSDoc comments.
Integrations
Targets Node.js and browser JavaScript runtimes together, uses Jest for testing, and JSDoc for inline documentation.
Who it's for
JavaScript developers writing or debugging async-heavy code across Node.js and the browser who need modern ES patterns, correct error-boundary placement, and tested output rather than ad hoc callback-based code.
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.