Created
May 22, 2018 09:50
-
-
Save hiz8/2ffc8a1c91b3ed47e8690ab000a330fd to your computer and use it in GitHub Desktop.
型チェック
This file contains hidden or 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 checkType(target, type) { | |
| const result = Object.prototype.toString.call(target).slice(8, -1) === type ? true : false; | |
| return result; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment