From dc6bea5c4eb25f56d2e3d27f194824667784ed21 Mon Sep 17 00:00:00 2001 From: doowb Date: Thu, 16 Jan 2020 11:48:39 -0500 Subject: [PATCH] only need to check `typeof val.constructor` --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bdcfdc8..dfa799b 100644 --- a/index.js +++ b/index.js @@ -66,7 +66,7 @@ module.exports = function kindOf(val) { }; function ctorName(val) { - return val.constructor && typeof val.constructor === 'function' ? val.constructor.name : null; + return typeof val.constructor === 'function' ? val.constructor.name : null; } function isArray(val) {