From f8d89aee2d5ce87380aaf3b985ae28759ff3abb9 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 4 Aug 2018 00:11:15 +0200 Subject: add \transform to reactivevar --- app/component.moon | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/component.moon') diff --git a/app/component.moon b/app/component.moon index fc29f8c..4f1d0c0 100644 --- a/app/component.moon +++ b/app/component.moon @@ -1,5 +1,7 @@ { :document } = js.global +warn = warn or -> print + -- convert anything to a DOM Node -- val must be one of: -- * DOM Node (instanceof window.Node) @@ -39,6 +41,8 @@ class ReactiveVar get: => @value + transform: (transform) => @set transform @get! + subscribe: (callback) => with -> @listeners[callback] = nil @listeners[callback] = callback -- cgit v1.2.3