[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] Lockout.lua - knockout.js clone in Lua
- From: 임창진(callin) <callin2@...>
- Date: Thu, 8 Mar 2012 18:16:16 +0900
Hi,
Lockout.lua is Knockout.js clone in Lua
It does not browser support. so there is no Binding feature.
It's main feature is "computed". It automatically subscribe dependent
observable like below.
more example can be found in lockout_test.lua
-----
local lo = require("lockout")
local underlyingObservable = lo.observable(1);
local dependent1 = lo.computed(function ()
return underlyingObservable() + 1;
end);
local dependent2 = lo.computed(function ()
return dependent1() + 1;
end);
assert(3 == dependent2());
underlyingObservable(11);
assert(13 == dependent2());
----
source code
- https://github.com/callin2/lockout.lua
Any comments and suggestions are welcome.
--
임창진(rim.chang.jin)