fork(6) download
  1. ko.observable.fn.beforeAndAfterSubscribe = function (callback, target) {
  2. var _oldValue;
  3. this.subscribe(function (oldValue) {
  4. _oldValue = oldValue;
  5. }, null, 'beforeChange');
  6.  
  7. this.subscribe(function (newValue) {
  8. callback.call(target, _oldValue, newValue);
  9. });
  10. };
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty