Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
realm.write(() => {
let obj = realm.create('PersonList', {list: []});
TestCase.assertInstanceOf(obj.list, Realm.List);
TestCase.assertInstanceOf(obj.list, Realm.Collection);
});
TestCase.assertThrowsContaining(() => new Realm.List(), 'constructor');
TestCase.assertInstanceOf(Realm.List, Function);
function isRealmList(x) {
return x !== null && x !== undefined && x.constructor === Realm.List
}