Allow m.prop to be JSON.stringify-ed

This commit is contained in:
Thomas Dy 2014-04-19 10:39:01 +08:00
parent d7b64ceab2
commit 95affb1cb2
2 changed files with 13 additions and 1 deletions

View file

@ -313,10 +313,14 @@ new function(window) {
//model
m.prop = function(store) {
return function() {
var f = function() {
if (arguments.length) store = arguments[0]
return store
}
f.toJSON = function() {
return store
}
return f
}
m.deferred = function() {