Skip to content

Commit

Permalink
only need to check typeof val.constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
doowb committed Jan 16, 2020
1 parent 1df992c commit dc6bea5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dc6bea5

Please sign in to comment.