data-mapping
Version:
Mapping the response to the defined data type.
23 lines (22 loc) • 790 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
function isBlank(value) {
return value === null || value === undefined || (value.length !== undefined && value.length === 0);
}
exports.isBlank = isBlank;
function isNotBlank(value) {
return value !== null && value !== undefined && (value.length === undefined || value.length > 0);
}
exports.isNotBlank = isNotBlank;
function subclassOf(subclass, superclass) {
if (!(subclass instanceof Function) || !(superclass instanceof Function))
return false;
var proto = subclass.prototype;
while (proto != null) {
if (proto instanceof superclass)
return true;
proto = proto.__proto__;
}
return false;
}
exports.subclassOf = subclassOf;
;