663464d0942511a298aab251d1d71bd24cb58705
[platform/framework/web/crosswalk-tizen.git] /
1
2
3     var _rKind = /^\[object (.*)\]$/,
4         _toString = Object.prototype.toString,
5         UNDEF;
6
7     /**
8      * Gets the "kind" of value. (e.g. "String", "Number", etc)
9      */
10     function kindOf(val) {
11         if (val === null) {
12             return 'Null';
13         } else if (val === UNDEF) {
14             return 'Undefined';
15         } else {
16             return _rKind.exec( _toString.call(val) )[1];
17         }
18     }
19     module.exports = kindOf;
20