UNPKG

@independo/capacitor-voice-recorder

Version:
17 lines 734 B
/** Default response shape when no config is provided. */ export const DEFAULT_RESPONSE_FORMAT = 'legacy'; /** Parses a user-provided response format into a supported value. */ export const resolveResponseFormat = (value) => { if (typeof value === 'string' && value.toLowerCase() === 'normalized') { return 'normalized'; } return DEFAULT_RESPONSE_FORMAT; }; /** Reads the response format from a Capacitor plugin config object. */ export const getResponseFormatFromConfig = (config) => { if (config && typeof config === 'object' && 'responseFormat' in config) { return resolveResponseFormat(config.responseFormat); } return DEFAULT_RESPONSE_FORMAT; }; //# sourceMappingURL=response-format.js.map