jQuery.type() is deprecated in jQuery 3.3 and above. When refactoring older code that uses this API, what should I use instead of jQuery.type()?
For example, one of the plugins my page relies on uses the $.type() API as illustrated below.
if ($.type(button) !== 'object') {
throw new Error('button with key "' + key + '" must be an object');
}
I'd like to replace it with something that isn't deprecated.