UNPKG

@data-client/core

Version:

Async State Management without the Management. REST, GraphQL, SSE, Websockets, Fetch

11 lines (10 loc) 362 B
export const ensurePojo = // FormData doesn't exist in node /* istanbul ignore else we don't run coverage when we test node*/ typeof FormData !== 'undefined' ? (body: any) => body instanceof FormData ? Object.fromEntries((body as any).entries()) : body : /* istanbul ignore next */ (body: any) => body; export default ensurePojo;