UNPKG

simple2k13

Version:
11 lines 370 B
const dataType = (data, options) => { const result = (typeof data); const { lowercase = false } = options || {}; if (result === 'object') { const result = Object.prototype.toString.call(data).slice(8, -1); return lowercase ? result.toLowerCase() : result; } return result; }; export default dataType; //# sourceMappingURL=index.js.map