UNPKG

@cookbook/dot-notation

Version:

Object readings and complex transformations using dot notation syntax.

22 lines (19 loc) 518 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /** * Returns a string with the data type from given value. * @example * typeOf('hello'); // output: string * typeOf(function() {}); // output: function * typeOf(new Date()); // output: date * @param value * @return {string} */ var typeOf = function typeOf(value) { return {}.toString.call(value).match(/\s([A-Za-z]+)/)[1].toLowerCase(); }; var _default = typeOf; exports.default = _default;