UNPKG

reactotron-redux

Version:
28 lines (25 loc) 670 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = createSendAction; function createSendAction(reactotron) { return (action, ms, important = false, diff) => { // let's call the type, name because that's "generic" name in Reactotron let { type: name } = action; // convert from symbol to type if necessary if (typeof name === "symbol") { name = name.toString().replace(/^Symbol\(/, "").replace(/\)$/, ""); } // off ya go! reactotron.send("state.action.complete", { name, action, ms, diff }, important); }; } //# sourceMappingURL=sendAction.js.map