UNPKG

reactotron-core-client

Version:

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

22 lines (21 loc) 572 B
"use strict"; /** * 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); } } }; }; export default apiResponse; //# sourceMappingURL=api-response.js.map