You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
379 B
13 lines
379 B
var isObj = require('./isObj'); |
|
var isArr = require('./isArr'); |
|
var isFn = require('./isFn'); |
|
var has = require('./has'); |
|
exports = function(val) { |
|
if (!isObj(val)) return false; |
|
var ctor = val.constructor; |
|
if (!isFn(ctor)) return false; |
|
if (!has(ctor.prototype, 'isPrototypeOf')) return false; |
|
return !isArr(val) && !isFn(val); |
|
}; |
|
|
|
module.exports = exports;
|
|
|