"use strict"; module.exports = function isConstructor(value) { /* TODO: This isn't great. Technically a regular function could have a non-empty prototype; and a constructor could have a prototype that *looks* empty but has a parent prototype that isn't. */ return (typeof value === "function" && value.prototype != null && Object.keys(value.prototype).length > 0); };