Advertisement
Guest User

Untitled

a guest
Jan 9th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function () {
  2.     'use strict';
  3.  
  4.     if(!Object.prototype.getType) {
  5.         Object.prototype.getType = function (obj) {
  6.             if(obj === undefined) return 'Undefined';
  7.             if(obj === null) return 'Null';
  8.  
  9.             var typeString = Object.prototype.toString.call(obj);
  10.             return typeString;
  11.         };
  12.     }
  13.  
  14. })();
  15. Object.getType(state);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement