LogoClawIndex
CasesSkillsAbout
LogoClawIndex

js_tosorted_immutable - Use toSorted() Instead of sort() for Immutability

Replaces sort() with toSorted() to maintain array immutability in JavaScript code

Tags

Updated: 2026-02-13

Capabilities

Typical Inputs

Typical Outputs

What this skill does

  • convert sort() to toSorted()
  • implement immutable array sorting
  • write immutable JavaScript code

Inputs

  • JavaScript code with sort()
  • array data
  • React components

Outputs

  • immutable sorted array
  • non-mutating code
  • preserved original array

Requirements

  • modern JavaScript environment
  • Chrome 110+ / Safari 16+ / Firefox 115+ / Node.js 20+
  • React application context

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.
javascript
arrays
immutability
react
state
mutation
convert sort() to toSorted()
implement immutable array sorting
write immutable JavaScript code
JavaScript code with sort()
array data
React components
immutable sorted array
non-mutating code
preserved original array