@ncodedcode/ncode_react_lib
Version:
ncode react application context library
23 lines • 811 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NCNetworkResponse = void 0;
var NCNetworkResponse = (function () {
function NCNetworkResponse(status, message, data) {
this.status = status;
this.message = message;
this.data = data;
}
Object.defineProperty(NCNetworkResponse.prototype, "isSuccess", {
get: function () {
return Math.floor(this.status / 100) === 2;
},
enumerable: false,
configurable: true
});
NCNetworkResponse.prototype.toString = function () {
return "(".concat(this.status, ") ").concat(this.message, "\n").concat(this.data);
};
return NCNetworkResponse;
}());
exports.NCNetworkResponse = NCNetworkResponse;
//# sourceMappingURL=NCNetworkResponse.js.map