A small polyfill for Object.setPrototypeOf with cross-platform compatibility
82
{
"context": "Evaluates how the solution uses the setprototypeof package to link objects while preserving behavior in environments without native prototype support. Scoring focuses solely on invoking the dependency correctly for both modern and legacy paths and relying on its built-in property-mixin fallback.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Imports helper",
"description": "Imports and references the `setPrototypeOf` function from the `setprototypeof` dependency instead of hand-rolled or native-only prototype wiring.",
"max_score": 15
},
{
"name": "Prototype path",
"description": "For the default path, calls `setPrototypeOf(target, base)` (or equivalent named import) to rewire the prototype rather than manually copying properties.",
"max_score": 30
},
{
"name": "Legacy mixin path",
"description": "When prototype support is unavailable or `forceLegacy` is true, still routes through `setPrototypeOf` so its property-mixin fallback runs, adding only missing enumerable members from `base` without overwriting target overrides.",
"max_score": 35
},
{
"name": "Single mechanism",
"description": "Uses `setPrototypeOf` as the sole mechanism for prototype adjustments across code paths (no parallel custom mixin logic) while returning the dependency’s result (the original target).",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-setprototypeof