Skip to main content

javascript

Write modern, idiomatic JavaScript with ES2022+ features and async patterns.

소스 정보

저장소
glayph/Agent
최근 소스 활동
2026년 9월 19일 22:39
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
javascript
description
Write modern, idiomatic JavaScript with ES2022+ features and async patterns.
version
1.0.0
author
Miki
license
MIT
platforms
["linux","macos","windows"]
metadata
{"Miki":{"tags":["javascript","es6","async","es2022"],"related_skills":["frontend-frameworks","testing-debugging"]}}
# JavaScript (ES6+) ## Modern syntax preferences - `const` / `let` over `var` - Arrow functions for callbacks, named functions for top-level - Template literals over string concatenation - Destructuring for object/array access - Spread `...` over `Object.assign` - Optional chaining `?.` and nullish coalescing `??` - Ternary over `if/else` for simple branching ## Array methods (chainable) ```js const result = arr .filter(Boolean) .map(item => item.value) .filter((v, i, a) => a.indexOf(v) === i) // unique .sort((a, b) => a - b) .reduce((acc, v) => acc + v, 0); ``` ## Async patterns ```js // Prefer async/await over .then() // Parallel: Promise.allSettled() over Promise.all() // Timeout: Promise.race([fetch(url), timeout(5000)]) // Sequential: for...of with await inside ``` ## Error handling ```js try { const result = await risky(); if (!result) throw new Error("not found"); } catch (err) { if (err instanceof SyntaxError) { /* recover */ } throw; // rethrow unknown } ``` ## Module conventions - Named exports over default exports - Barrel files (`index.js`) for public API surface - Absolute imports with path aliases (no `../../../`) - `import type` for type-only imports (TS) ## Performance rules - Debounce input handlers (300ms) - Throttle scroll/resize (100ms) - Avoid forced reflows — batch DOM reads/writes - Use `requestAnimationFrame` for visual updates - Memoize pure computations - `for` loops > array methods at scale (10k+ items)
GitHub에서 보기