4 lines
145 B
JavaScript
4 lines
145 B
JavaScript
|
export const is = (obj, type) => {
|
||
|
return Object.prototype.toString.call(obj).slice(8, -1) === type && obj !== undefined && obj !== null;
|
||
|
};
|