UNPKG

@o3r/core

Version:
10 lines 370 B
import { v4, } from 'uuid'; import { isAsyncRequest, } from './async.helpers'; /** * Returns a creator that makes sure that requestId is defined in the action's properties by generating one * if needed. */ export const asyncProps = () => { return (props) => isAsyncRequest(props) ? props : { ...props, requestId: v4() }; }; //# sourceMappingURL=async.props.js.map