A decorator would be perfect for this.
I'd like to wait until the Decorator proposal is stage 3 though.
Example:
const lazy = require('define-lazy-prop/decorator');
class Unicorn {
@lazy rainbow() {
return 'Lazily computed value';
}
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too