sindresorhus/define-lazy-prop

Decorator

Open

#1 geöffnet am 16. Jan. 2017

Auf GitHub ansehen
 (5 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)JavaScript (67 Stars) (6 Forks)user submission
enhancementhelp wanted

Beschreibung

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