Files
30-seconds-of-code/test/getType/getType.js
2018-01-17 13:40:40 -05:00

3 lines
134 B
JavaScript

const getType = v =>
v === undefined ? 'undefined' : v === null ? 'null' : v.constructor.name.toLowerCase();
module.exports = getType