Better object creation
const addressSchema = {
street: String,
number: Number,
postalCode: String,
city: String,
country: String,
};
const Address = Obj({ schema: addressSchema })
const myAddress = Address.create({
street: 'Abc',
number: 42,
postalCode: '1234AB',
city: 'Example',
country: 'The Netherlands'
})
Now it returns an object, and you can call all methods on the object.
e.g.
myAddress.street // 'Abc'
myAddress.keys() // ['street', 'number', 'postalcode', 'city', 'country']