broken-link-checker icon indicating copy to clipboard operation
broken-link-checker copied to clipboard

`SiteChecker.prototype.on` is not a function

Open hasezoey opened this issue 2 years ago • 0 comments

Describe the bug SiteChecker.prototype.on is not a function

To Reproduce

const { SiteChecker } = require('broken-link-checker');
const { EventEmitter } = require('events');

const siteChecker = new SiteChecker({});

console.log(siteChecker instanceof EventEmitter); // logs: false

siteChecker.on('end', () => {}); // Error, ".on" is not a function

Expected behavior to correctly inherit EventEmitter, or at least provide the mentioned functions

from the documentation:

All methods from EventEmitter are available.

Environment:

  • OS and version: Manjaro 22.0.1
  • Node.js version: 19.5.0
  • broken-link-checker version: 0.7.8

It seems like this issue would be solved if 0.8.0 would be released, as requested in #244

hasezoey avatar Feb 05 '23 11:02 hasezoey