@base-ui-components/react
Version:
Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.
19 lines (18 loc) • 338 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.serializeValue = serializeValue;
function serializeValue(value) {
if (value == null) {
return '';
}
if (typeof value === 'string') {
return value;
}
try {
return JSON.stringify(value);
} catch {
return String(value);
}
}
;