Comparing version 0.2.1 to 0.3.0
@@ -30,5 +30,7 @@ // Generated by CoffeeScript 1.3.3 | ||
renderRaw: template.renderRaw, | ||
global: require('./core/global') | ||
global: require('./core/global'), | ||
watch: ref.watch, | ||
watchRef: ref.watchRef | ||
}; | ||
}).call(this); |
@@ -5,6 +5,8 @@ // Generated by CoffeeScript 1.3.3 | ||
var copy, get, notify, set, _ref; | ||
var copy, get, notify, set, watch, watchRef, _ref; | ||
_ref = require('../../protocol/mutable'), set = _ref.set, get = _ref.get; | ||
watchRef = require('../../core/reference').watchRef; | ||
copy = function(src, tgt) { | ||
@@ -18,2 +20,8 @@ return set(tgt, get(src)); | ||
watch = function(watchedRef, watchFn) { | ||
return watchRef(watchedRef, function() { | ||
return watchFn(mutable.get(watchedRef)); | ||
}); | ||
}; | ||
module.exports = { | ||
@@ -23,5 +31,7 @@ set: set, | ||
copy: copy, | ||
notify: notify | ||
notify: notify, | ||
watch: watch, | ||
watchRef: watchRef | ||
}; | ||
}).call(this); |
{ | ||
"name": "cosy-js", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "A cosy little library.", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110855
2047