@strongnguyen/oidc-provider
Version:
OAuth 2.0 Authorization Server implementation for Node.js with OpenID Connect
13 lines (9 loc) • 412 B
JavaScript
const hasPrototype = (target) => target.prototype !== null && typeof target.prototype === 'object';
const isContructor = (fn) => fn.constructor instanceof Function
&& fn.constructor.name !== undefined;
const isConstructable = (constructable) => constructable instanceof Function
&& hasPrototype(constructable)
&& isContructor(constructable.constructor);
module.exports = {
isConstructable,
};