UNPKG

msw

Version:

Seamless REST/GraphQL API mocking library for browser and Node.js.

14 lines 342 B
import { isObject } from '../../utils/internal/isObject.mjs'; function getMessageLength(data) { if (data instanceof Blob) { return data.size; } if (isObject(data) && "byteLength" in data) { return data.byteLength; } return new Blob([data]).size; } export { getMessageLength }; //# sourceMappingURL=getMessageLength.mjs.map