dist/web-atoms-mvvm.js
function AtomWatcher(target, path, runAfterSetup, forValidation) {
            var _this = this;
            this._isExecuting = false;
            this.target = target;
            var e = false;
            if (forValidation === true) {
                this.forValidation = true;
            }
            if (path instanceof Function) {
                var f = path;
                path = parsePath(path);
                e = true;
                this.func = f;
                this.funcText = f.toString();
            }
            this.runEvaluate = function () {
                _this.evaluate();
            };
            this.runEvaluate.watcher = this;
            this.path = path.map(function (x) { return x.split(".").map(function (y) { return new ObjectProperty(y); }); });
            if (e) {
                if (runAfterSetup) {
                    this.evaluate();
                }
                // else {
                //     // setup watcher...
                //     for(var p of this.path) {
                //         this.evaluatePath(this.target,p);
                //     }
                // }
            }
        }
function AtomWatcher(target, path, runAfterSetup, forValidation) {
            var _this = this;
            this._isExecuting = false;
            this.target = target;
            var e = false;
            if (forValidation === true) {
                this.forValidation = true;
            }
            if (path instanceof Function) {
                var f = path;
                path = parsePath(path);
                e = true;
                this.func = f;
                this.funcText = f.toString();
            }
            this.runEvaluate = function () {
                _this.evaluate();
            };
            this.runEvaluate.watcher = this;
            this.path = path.map(function (x) { return x.split(".").map(function (y) { return new ObjectProperty(y); }); });
            if (e) {
                if (runAfterSetup) {
                    this.evaluate();
                }
                // else {
                //     // setup watcher...
                //     for(var p of this.path) {
                //         this.evaluatePath(this.target,p);
                //     }
                // }
            }
        }
function AtomWatcher ( target , path , runAfterSetup , forValidation ) { var _this = this ; this . _isExecuting = false ; this . target = target ; var e = false ; if ( forValidation === true ) { this . forValidation = true ; } if ( path instanceof Function ) { var f = path ; path = parsePath ( path ) ; e = true ; this . func = f ; this . funcText = f . toString ( ) ; } this . runEvaluate = function ( ) { _this . evaluate ( ) ; } ; this . runEvaluate . watcher = this ; this . path = path . map ( function ( x ) { return x . split ( "." ) . map ( function ( y ) { return new ObjectProperty ( y ) ; } ) ; } ) ; if ( e ) { if ( runAfterSetup ) { this . evaluate ( ) ; } // else { //     // setup watcher... //     for(var p of this.path) { //         this.evaluatePath(this.target,p); //     } // } } }
Creates an instance of AtomWatcher.

var w = new AtomWatcher(this, x => x.data.fullName = `${x.data.firstName} ${x.data.lastName}`);

You must dispose `w` in order to avoid memory leaks.
Above method will set fullName whenver, data or its firstName,lastName property is modified.

AtomWatcher will assign null if any expression results in null in single property path.

In order to avoid null, you can rewrite above expression as,

var w = new AtomWatcher(this,
x => {
if(x.data.firstName && x.data.lastName){
x.data.fullName = `${x.data.firstName} ${x.data.lastName}`
}
});

@param {T} target - Target on which watch will be set to observe given set of properties
@param {(string[] | ((x:T) => any))} path - Path is either lambda expression or array of
property path to watch, if path was lambda, it will be executed when any of
members will modify
@param {boolean} [forValidation] forValidtion - Ignore, used for internal purpose
@memberof AtomWatcher
Creates an instance of AtomWatcher .