christeach
6/27/2019 - 10:05 AM

getType - reliable function to get types in JS

function getType(obj) {
  return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();
}