dtable-utils
Version:
dtable common utils
22 lines (15 loc) • 631 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var _typeof = require('@babel/runtime/helpers/typeof');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
var isFileValue = function isFileValue(object) {
if (_typeof__default["default"](object) !== 'object') {
return false;
}
var needKeys = ['name', 'size', 'url', 'type'];
return needKeys.every(function (key) {
return object[key] || object[key] === 0;
});
};
exports.isFileValue = isFileValue;