Files
jitsi-meet/react/features/base/react/functions.ts
2022-09-21 11:32:50 +03:00

10 lines
375 B
TypeScript

/**
* Returns the field value in a platform generic way.
*
* @param {Object | string} fieldParameter - The parameter passed through the change event function.
* @returns {string}
*/
export function getFieldValue(fieldParameter: { target: { value: string; }; } | string) {
return typeof fieldParameter === 'string' ? fieldParameter : fieldParameter?.target?.value;
}