@advdominion/is

This commit is contained in:
Valentin Silytuin
2024-04-27 23:44:24 +04:00
parent b9414854b2
commit 5359166f88
4 changed files with 32 additions and 0 deletions

3
packages/is/index.js Normal file
View File

@@ -0,0 +1,3 @@
export const is = (obj, type) => {
return Object.prototype.toString.call(obj).slice(8, -1) === type && obj !== undefined && obj !== null;
};