@sentry/react-native
Version:
Official Sentry SDK for react-native
22 lines • 659 B
JavaScript
import { normalize } from '@sentry/core';
const KEY = 'value';
/**
* Converts any input into a valid record with string keys.
*/
// oxlint-disable-next-line typescript-eslint(no-explicit-any)
export function convertToNormalizedObject(data) {
const normalized = normalize(data);
if (normalized !== null &&
typeof normalized === 'object' &&
!Array.isArray(normalized) &&
normalized.constructor === Object) {
// oxlint-disable-next-line typescript-eslint(no-explicit-any)
return normalized;
}
else {
return {
[KEY]: normalized,
};
}
}
//# sourceMappingURL=normalize.js.map