Question: What's the best way to extend a rule?
nandorojo opened this issue · comments
Say I have this rule:
let rule = new RRule({ freq: RRule.WEEKLY })
What's the best way to "edit" the class, preferably immutably?
Should I do this?
let rule = new RRule({ freq: RRule.WEEKLY })
let newRule = new RRule({ ...rule.options, byweekday: [1] })
Thanks!