UNPKG

@o3r/core

Version:
25 lines 699 B
/** * Determine if the action is an AsyncRequest action * @param action Redux Action */ export function isCallAction(action) { if (!action) { return false; } return !!action.call && action.call instanceof Promise; } /** * Determine if the action is an AsyncRequest action with a Request ID * @param action Redux Action */ export function isIdentifiedCallAction(action) { return isCallAction(action) && typeof action.requestId !== 'undefined'; } /** * Determine if the given item implements the AsyncRequest interface * @param item */ export function isAsyncRequest(item) { return typeof item.requestId !== 'undefined'; } //# sourceMappingURL=async.helpers.js.map