Sha256: caff0a78ab2a2406794700f9bedc8ce8beadc115e7cefbe7d407cdb8e3bbdc24

Contents?: true

Size: 1.21 KB

Versions: 22

Compression:

Stored size: 1.21 KB

Contents

import {PathObserver} from '../../vendor/observe-js/observe.js';
import {Callbacks} from 'jquery';
var KeypathObserver,
  __hasProp = {}.hasOwnProperty,
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

KeypathObserver = (function(_super) {
  __extends(KeypathObserver, _super);

  function KeypathObserver(object, keypath) {
    _super.call(this, object, keypath);
    this.callbacks = Callbacks();
    this.open((function() {
      return this.fireWith(object, arguments);
    }), this.callbacks);
  }

  KeypathObserver.prototype.add = function(callback) {
    return this.callbacks.add(callback);
  };

  KeypathObserver.prototype.remove = function() {
    var _ref;

    return (_ref = this.callbacks).remove.apply(_ref, arguments);
  };

  KeypathObserver.prototype.close = function() {
    KeypathObserver.__super__.close.apply(this, arguments);
    this.callbacks.empty();
    return delete this.callbacks;
  };

  return KeypathObserver;

})(PathObserver);

export default KeypathObserver;

Version data entries

22 entries across 20 versions & 1 rubygems

Version Path
ende-0.5.22 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.22 components/indefinido/indemma/master/components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.21 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.21 components/indefinido/indemma/master/components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.20 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.19 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.18 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.17 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.16 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.15 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.14 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.13 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.12 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.10 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.9 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.8 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.7 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.6 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.5 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js
ende-0.5.4 components/indefinido/observable/es6-modules/lib/observable/keypath_observer.js