/** * Graphology isGraphConstructor * ============================== * * Very simple function aiming at ensuring the given variable is a * graphology constructor. */ /** * Checking the value is a graphology constructor. * * @param {any} value - Target value. * @return {boolean} */ module.exports = function isGraphConstructor(value) { return ( value !== null && typeof value === 'function' && typeof value.prototype === 'object' && typeof value.prototype.addUndirectedEdgeWithKey === 'function' && typeof value.prototype.dropNode === 'function' ); };