@linaria/utils
Version:
Blazing fast zero-runtime CSS in JS library
13 lines • 441 B
JavaScript
import { isBoxedPrimitive } from './isBoxedPrimitive';
export function isSerializable(o) {
if (Array.isArray(o)) {
return o.every(isSerializable);
}
if (o === null) return true;
if (isBoxedPrimitive(o)) return true;
if (typeof o === 'object') {
return Object.values(o).every(isSerializable);
}
return typeof o === 'string' || typeof o === 'number' || typeof o === 'boolean';
}
//# sourceMappingURL=isSerializable.js.map