src/Ass.js
function _keepAssigned(ka, o, pusher = unshift) {

  // Handle an upwardable object changing, in case of `O(model.obj)`.
  function objectChanged(_o) {
    replace(ka.objs, o, _o);
    recalc(ka);
  }

  // @TODO: figure out how to handle this.
  //  upward(o, objectChanged);

  function key(v, k) {
    placeKey(ka, v, k);
  }

  function update(k, v) {
    processKey(k, v);
  }

  function _delete(k) {
    recalc(ka);
  }

  var handlers = {
    add: argify(placeKey, ka),
    update: argify(placeKey, ka),
    delete: _delete
  };
  observeObject(o, makeObserver(handlers));

  pusher.call(ka.objs, o);
  mapObject(o, (v, k) => placeKey(ka, v, k, pusher));
  return ka;
}
function _keepAssigned(ka, o, pusher = unshift) {

  // Handle an upwardable object changing, in case of `O(model.obj)`.
  function objectChanged(_o) {
    replace(ka.objs, o, _o);
    recalc(ka);
  }

  // @TODO: figure out how to handle this.
  //  upward(o, objectChanged);

  function key(v, k) {
    placeKey(ka, v, k);
  }

  function update(k, v) {
    processKey(k, v);
  }

  function _delete(k) {
    recalc(ka);
  }

  var handlers = {
    add: argify(placeKey, ka),
    update: argify(placeKey, ka),
    delete: _delete
  };
  observeObject(o, makeObserver(handlers));

  pusher.call(ka.objs, o);
  mapObject(o, (v, k) => placeKey(ka, v, k, pusher));
  return ka;
}
function _keepAssigned ( ka , o , pusher = unshift ) { // Handle an upwardable object changing, in case of `O(model.obj)`. function objectChanged ( _o ) { replace ( ka . objs , o , _o ) ; recalc ( ka ) ; } // @TODO: figure out how to handle this. //  upward(o, objectChanged); function key ( v , k ) { placeKey ( ka , v , k ) ; } function update ( k , v ) { processKey ( k , v ) ; } function _delete ( k ) { recalc ( ka ) ; } var handlers = { add : argify ( placeKey , ka ) , update : argify ( placeKey , ka ) , delete : _delete } ; observeObject ( o , makeObserver ( handlers ) ) ; pusher . call ( ka . objs , o ) ; mapObject ( o , ( v , k ) => placeKey ( ka , v , k , pusher ) ) ; return ka ; }
Push one object onto a keepAssigned object, either at the front or back.
Push one object onto a keepAssigned object either at the front or back .