"use strict"; // FIXME: Package separately under @validatem/ const isFunction = require("@validatem/is-function"); const ValidationError = require("@validatem/error"); module.exports = [ isFunction, (func) => { let current = func.prototype; while (current != null) { if (current === Error.prototype) { return; } current = Object.getPrototypeOf(current); } throw new ValidationError(`Must be an error constructor`); } ];