realm-flipper-plugin
Version:
A Flipper Plugin to debug Realm applications.
24 lines (21 loc) • 464 B
text/typescript
import type { CanonicalObjectSchemaProperty } from 'realm';
export const isPropertyLinked = (property: CanonicalObjectSchemaProperty) => {
const primitiveTypes = new Set([
'bool',
'int',
'float',
'double',
'string',
'decimal128',
'objectId',
'date',
'data',
'list',
'set',
'dictionary',
'linkingObjects',
]);
return (
property.objectType && !primitiveTypes.has(property.objectType as string)
);
};