Last active
December 27, 2021 01:38
-
-
Save arthurguedes375/869d5f6e9d176ad198f04b4da83e4067 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function is(type = '', value) { | |
const toStringResult = Object.prototype.toString.call(value) | |
.toLowerCase() | |
.replace(/[\[\]']/g, "") | |
.split(" ")[1]; | |
return type === toStringResult; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment