Hello! Realm’s JS feature compatibility list says it supports both destructing assignment and default function parameters. The last example on MDN shows how these can be used together.
However, this appears to break in Realm functions:
exports = ({limit, offset} = {limit: 10, offset: 20}) => {
console.log('limit', limit);
}
In Realm Functions, clicking Run on this prints limit undefined
instead of limit 10
as you would expect.
This is valid syntax in general. Let me know if there’s anything else I can do to help debug.