senrecep/tsentials/tsentials-ord

Claude Code and agent skill by senrecep/tsentials

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install senrecep/tsentials/tsentials-ord

SKILL.md

tsentials/ord — Skill

Use when you need type-safe sorting, min/max, or range clamping.

API

typescript
import { Ord, sortBy, min, max, clamp, between } from 'tsentials/ord';
import type { Ordering } from 'tsentials/ord'; // -1 | 0 | 1
// Primitive ordering
Ord.number.compare(1, 2); // -1
Ord.string.compare('b', 'a'); // 1
Ord.boolean.compare(false, true); // -1 (false < true)
Ord.date.compare(d1, d2); // chronological
// Reverse ordering
const desc = Ord.reverse(Ord.number);
// Project before comparing
interface User { readonly name: string; readonly age: number; }
const byAge = Ord.contramap(Ord.number, (u: User) => u.age);
// Struct ordering (multi-field, lexicographic)
const byNameThenAge = Ord.struct<User>({ name: Ord.string, age: Ord.number });
// Sort an array
sortBy([3, 1, 4], Ord.number); // [1, 3, 4]
// Min / max
min(Ord.number, 1, 2); // 1
max(Ord.number, 1, 2); // 2
// Range checks
clamp(Ord.number, 0, 10, 15); // 10
between(Ord.number, 0, 10, 5); // true

Patterns

  • Use Ord.contramap to sort arrays of objects by a specific field.
  • Use Ord.struct for lexicographic multi-field ordering (compares fields in order, short-circuits on first difference).
  • Use clamp to ensure values stay within bounds.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/senrecep/tsentials/tsentials-ord/badge)](https://verified-skill.com/skills/senrecep/tsentials/tsentials-ord)

Something wrong with this skill or its page? Tell us.