GitXplorerGitXplorer
d

Observable-Objects

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
80510af42755e2feda4ddca652284ba4a33a387e

basic functions completed

ddeepak1556 committed 12 years ago

README

The README file for this repository.

Observable-Objects

its an implentation of knockout observables using defineProperty method

Basic usage example

var obj = require('obsObj');
var firstName = obj.prop('Delta'),
    lastName = obj.prop('Force'),
    fullName = obs.computed(function() {
        return firstName() + lastName();
    }, [firstName, lastName]);

console.log('FullName : ' + fullName());
// 'FullName : DeltaForce'

fullName.subscribe(function(value, old) {
    console.log('FullName is changed to' + value + ' (from: ' + old + ')');
});

lastName("");
// 'FullName is changed to Delta (from: DeltaForce)'