CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-setprototypeof

A small polyfill for Object.setPrototypeOf with cross-platform compatibility

82

1.02x
Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "Evaluates how well the solution uses the setprototypeof package to rebind object prototypes across runtimes, relying on its __proto__ assignment and property-copy fallbacks instead of native-only logic. Checks emphasize invoking `setPrototypeOf` for both standard and null blueprints while avoiding custom fallback implementations.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports package",
      "description": "Imports the setprototypeof package (e.g., default export `setPrototypeOf`) rather than depending solely on built-in `Object.setPrototypeOf`.",
      "max_score": 20
    },
    {
      "name": "Prototype calls",
      "description": "Uses the package function to mutate the target's prototype to the provided blueprint in the main code path instead of manual prototype manipulation.",
      "max_score": 30
    },
    {
      "name": "Fallback reliance",
      "description": "Relies on the package for cross-environment behavior (including `__proto__` assignment and property-copy fallback) without reimplementing custom fallbacks or skipping the package when native support is absent.",
      "max_score": 20
    },
    {
      "name": "Null handling",
      "description": "Invokes the package function with `null` blueprints to remove prototypes, ensuring null cases are covered through the package API.",
      "max_score": 15
    },
    {
      "name": "Return usage",
      "description": "Uses the mutated object returned by the package call as the function's result rather than creating alternate copies or ignoring the return value.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-setprototypeof

tile.json