@tedcryptoorg/cosmos-signer
Version:
Cosmos Signer - A library for signing transactions for Cosmos SDK chains
19 lines (18 loc) • 441 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isEmpty = isEmpty;
function isEmpty(value) {
if (value === null || value === undefined) {
return true;
}
if (value === '') {
return true;
}
if (Array.isArray(value)) {
return value.length === 0;
}
if (typeof value === 'object') {
return Object.keys(value).length === 0;
}
return false;
}