@cookbook/dot-notation
Version:
Object readings and complex transformations using dot notation syntax.
21 lines (18 loc) • 873 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var _default = {
nullOrUndefined: function nullOrUndefined(value) {
return value === null || value === undefined;
},
object: function object(value) {
return value !== null && _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Object]';
},
array: function array(value) {
return Array.isArray(value);
}
};
exports.default = _default;