Created
March 19, 2018 10:35
-
-
Save hrdtbs/308f527b1fb1d99c62bec5468932185a to your computer and use it in GitHub Desktop.
JavaScriptの型判定のような何か、必要になったものから追加
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
export const isObject = target => | |
value !== null && typeof value !== "undefined" && Object(value) === value; | |
export const isArray = target => Array.isArray(target); | |
export const isString = target => typeof target === "string"; | |
// template literalという型は存在しないが | |
export const isTemplateLiteral = target => !!target.raw; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment