UNPKG

reactotron-core-client

Version:

Grants Reactotron clients the ability to talk to a Reactotron server.

26 lines (25 loc) 681 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /** * Sends API request/response information. */ const apiResponse = () => reactotron => { return { features: { apiResponse: (request, response, duration) => { const ok = response && response.status && typeof response.status === "number" && response.status >= 200 && response.status <= 299; const important = !ok; reactotron.send("api.response", { request, response, duration }, important); } } }; }; var _default = exports.default = apiResponse; //# sourceMappingURL=api-response.js.map