Toolverse
All skills

js-tosorted-immutable

by TheOrcDev

Use toSorted() instead of sort() to avoid mutating arrays. Apply when sorting arrays that are React props, state, or otherwise shared/referenced elsewhere.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
TheOrcDev
Category
Frontend
Views
3

About this skill

Use toSorted() instead of sort() to avoid mutating arrays. Apply when sorting arrays that are React props, state, or otherwise shared/referenced elsewhere.

How to use

  1. Zainstaluj skill w swoim projekcie Claude lub Copilot, dodając plik js-tosorted-immutable do katalogu skills.

  2. Gdy piszesz kod React z sortowaniem tablic, skill automatycznie wykryje użycie sort() na tablicach pochodzących z propsów, stanu lub zmiennych współdzielonych między komponentami.

  3. Zaakceptuj sugestię skill'u, aby zamienić sort() na toSorted(). Zmiana jest prosta: zamiast users.sort((a, b) => ...) użyj users.toSorted((a, b) => ...).

  4. Jeśli pracujesz w starszym środowisku, które nie wspiera toSorted(), skill zasugeruje fallback z operatorem spread: [...items].sort((a, b) => ...).

  5. Sprawdź, czy Twoja przeglądarka lub wersja Node.js obsługuje toSorted() — dostępny jest w Chrome 110+, Safari 16+, Firefox 115+ i Node.js 20+. Dla starszych wersji używaj fallbacku.

  6. Pamiętaj, że skill dotyczy również innych immutable metod tablic: toReversed() zamiast reverse() oraz toSpliced() zamiast splice(). Stosuj je konsekwentnie w całym kodzie React.

Related skills

shadcn-ui

by josechifflet

shadcn/ui component patterns for Next.js 16 applications. This skill should be used when adding UI components, customizing component styles, composing primitives, or integrating forms with react-hook-form. Covers installation, customization, composition patterns, and

Frontend
157206

frontend-slides

by sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual

Frontend
65135

livewire-development

by spatie

Develops reactive Livewire 4 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading, or any wire: directives; adding real-time updates, loading states, or reactivity; debugging component behavior;

Frontend
2335

angular

by sickn33

Modern Angular (v20+) expert with deep knowledge of Signals, Standalone Components, Zoneless applications, SSR/Hydration, and reactive patterns. Use PROACTIVELY for Angular development, component architecture, state management, performance optimization, and migration to modern

Frontend
2656

dev-browser

by SawyerHood

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include \

Frontend
38151

domain-name-brainstormer

by ComposioHQ

Generates creative domain name ideas for your project and checks availability across multiple TLDs (.com, .io, .dev, .ai, etc.). Saves hours of brainstorming and manual checking.

Frontend
21116