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-1/

{
  "context": "Evaluates how the solution leverages the unique-random package to build a callable-and-iterable range sampler that avoids consecutive repeats while keeping both bounds reachable. Scoring focuses solely on correct and idiomatic use of the package APIs aligned with the spec’s requirements. No general code style considerations are included.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Factory choice",
      "description": "Imports from unique-random and builds the sampler with `consecutiveUniqueRandom(minimum, maximum)`, avoiding `exhaustiveUniqueRandom`, so consecutive draws differ.",
      "max_score": 25
    },
    {
      "name": "Inclusive bounds",
      "description": "Calls the factory with the provided minimum and maximum values without off-by-one adjustments, ensuring the generator can emit both ends of the range.",
      "max_score": 15
    },
    {
      "name": "Shared iterable",
      "description": "Exposes the package’s returned callable directly and re-exports its `[Symbol.iterator]` so function calls and iteration share a single generator state rather than separate copies.",
      "max_score": 20
    },
    {
      "name": "No custom rerolls",
      "description": "Relies on the package’s built-in consecutive-uniqueness instead of layering extra filtering or re-roll logic that could bias outcomes or block extremes.",
      "max_score": 15
    },
    {
      "name": "Single-value range",
      "description": "Delegates the `minimum === maximum` case to `consecutiveUniqueRandom` rather than short-circuiting with custom constants.",
      "max_score": 10
    },
    {
      "name": "Reachability preserved",
      "description": "Avoids transformations (clamping, mapping, manual shuffling) that would prevent the package from emitting both bounds over time, preserving uniform reachability.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-unique-random

tile.json