View on GitHub
 (5 comments) (5 reactions) (0 assignees)JavaScript (6 forks)user submission
enhancementhelp wanted

Repository metrics

Stars
 (67 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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';
	}
}

Contributor guide