CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-unique-random

Generate random numbers that are consecutively unique

90

1.13x
Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "Evaluates whether the rotator is built directly on unique-random's consecutiveUniqueRandom so that callable and iterable access share the same non-repeating stream, including proper bounds mapping and single-value handling. Scoring focuses solely on correct and consistent use of the package API to satisfy the spec behaviors.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Correct factory",
      "description": "Instantiates unique-random's consecutiveUniqueRandom(minimum, maximum) to drive rotations, avoiding exhaustiveUniqueRandom or custom RNGs.",
      "max_score": 20
    },
    {
      "name": "Single instance",
      "description": "Creates one consecutiveUniqueRandom generator per rotator and reuses it for all access patterns instead of re-creating generators per call.",
      "max_score": 20
    },
    {
      "name": "Shared iterator",
      "description": "Uses the generator's callable-and-iterable nature (calling it and iterating via [Symbol.iterator]) so iteration and next() consume the same stream.",
      "max_score": 20
    },
    {
      "name": "Bounds mapping",
      "description": "Sets generator bounds to cover every ID (e.g., 0 to ids.length - 1) so the package controls consecutive uniqueness across the full range.",
      "max_score": 20
    },
    {
      "name": "Degenerate range",
      "description": "Relies on consecutiveUniqueRandom's defined behavior when minimum equals maximum to handle single-ID inputs without extra custom logic that bypasses the package.",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-unique-random

tile.json