lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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)