index.js
function type(value) {
  let valueType = typeof value;
  if (Array.isArray(value)) {
    valueType = 'array';
  } else if (value instanceof Date) {
    valueType = 'date';
  } else if (value === null) {
    valueType = 'null';
  }

  return valueType;
}
function type(value) {
  let valueType = typeof value;
  if (Array.isArray(value)) {
    valueType = 'array';
  } else if (value instanceof Date) {
    valueType = 'date';
  } else if (value === null) {
    valueType = 'null';
  }

  return valueType;
}
function type ( value ) { let valueType = typeof value ; if ( Array . isArray ( value ) ) { valueType = 'array' ; } else if ( value instanceof Date ) { valueType = 'date' ; } else if ( value === null ) { valueType = 'null' ; } return valueType ; }
An enhanced version of `typeof` that handles arrays and dates as well.
An enhanced version of typeof that handles arrays and dates as well .