(
input: AnalyticsDispatchInput,
)
| 55 | } |
| 56 | |
| 57 | function process( |
| 58 | input: AnalyticsDispatchInput, |
| 59 | ): AnalyticsDispatchPayload[] { |
| 60 | if (isDevEnv) { |
| 61 | return [] |
| 62 | } |
| 63 | |
| 64 | const payload = toTrackableAnalyticsPayload(input) |
| 65 | if (payload) { |
| 66 | const toSend = flushBufferWithUser(payload.userId) |
| 67 | toSend.push(payload) |
| 68 | return toSend |
| 69 | } |
| 70 | |
| 71 | if ( |
| 72 | bufferWhenNoUser && |
| 73 | getAnalyticsEventId(input.data as AnalyticsLogData) |
| 74 | ) { |
| 75 | buffered.push(input) |
| 76 | } |
| 77 | |
| 78 | return [] |
| 79 | } |
| 80 | |
| 81 | return { process } |
| 82 | } |
nothing calls this directly
no test coverage detected