You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because typeof can not check Array type. Actually, you can also use Array.isArray to check if is array, or use array.constructor === Array. For browser compatibility reason, I'm using Object.prototype.toString.call(It can also changed to x.constructor === Array/Number/Object)
I'm interested in your methods of type checking and wondering why you use it over
typeof
.https://github.com/ecmadao/chrome-utils/blob/master/src/utils/helper.js
I'd have to assume it's either performance or for getting type of array?
The text was updated successfully, but these errors were encountered: