CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-wolfy87-eventemitter

Event based JavaScript for the browser with comprehensive event management API

91

1.26x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how effectively the engineer uses the wolfy87-eventemitter package to implement a subscription manager. The focus is on correct usage of the package's event listener management API, including adding listeners, removing listeners, and leveraging built-in features like duplicate prevention and method chaining.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "EventEmitter instantiation",
      "description": "Creates an EventEmitter instance using the correct import and constructor pattern (e.g., `new EventEmitter()` or `const emitter = new EventEmitter()`).",
      "max_score": 10
    },
    {
      "name": "addListener/on usage",
      "description": "Uses `addListener()` or `on()` method to register event listeners for subscription functionality, passing both event name and callback function as parameters.",
      "max_score": 25
    },
    {
      "name": "removeListener/off usage",
      "description": "Uses `removeListener()` or `off()` method to unregister specific event listeners for unsubscription functionality, passing both event name and the specific callback function to remove.",
      "max_score": 25
    },
    {
      "name": "Built-in duplicate prevention",
      "description": "Relies on EventEmitter's built-in duplicate prevention feature rather than implementing custom logic to prevent duplicate listener registration. The package automatically prevents the same listener from being added twice.",
      "max_score": 15
    },
    {
      "name": "Method chaining support",
      "description": "Leverages EventEmitter's method chaining capability by returning the emitter instance from methods, allowing fluent API usage (e.g., `manager.subscribe(...).subscribe(...)`).",
      "max_score": 15
    },
    {
      "name": "Listener validation",
      "description": "Relies on EventEmitter's built-in validation that throws TypeError when non-function values are passed as listeners, rather than implementing custom validation logic.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-wolfy87-eventemitter

tile.json