Last active
September 25, 2015 07:47
-
-
Save think49/887049 to your computer and use it in GitHub Desktop.
is-object.js : Object型なら true を返し、他の型なら false を返す(ES6対応)
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
/** | |
* is-object.js | |
* | |
* @version 1.0.3 | |
* @author think49 | |
* @url https://gist.github.com/887049 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ | |
'use strict'; | |
function isObject (value) { | |
return value !== null && typeof value !== 'undefined' && Object(value) === value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Object 型以外も判定したい場合は get-type.js を利用してみてください。
参考URL