Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ko.subscribable.fn.subscribeChanged = function( callback ) {
- var oldValue;
- return [
- this.subscribe( function( _oldValue ) {
- oldValue = _oldValue;
- }, this, 'beforeChange' ),
- this.subscribe( function( newValue ) {
- callback( newValue, oldValue );
- } )
- ];
- };
Add Comment
Please, Sign In to add comment