{"size": 350, "ext": "js", "max_stars_repo_path": "nodejs/js/aluraframe/client/js/app-es6/helper/Bind.js", "max_stars_repo_name": "wesleyegberto/courses", "max_stars_repo_stars_event_min_datetime": "2017-03-04T02:36:20.000Z", "max_stars_repo_stars_event_max_datetime": "2017-03-04T02:36:20.000Z", "max_issues_repo_path": "nodejs/js/aluraframe/client/js/app-es6/helper/Bind.js", "max_issues_repo_name": "wesleyegberto/courses", "max_issues_repo_issues_event_min_datetime": "2020-07-16T17:26:30.000Z", "max_issues_repo_issues_event_max_datetime": "2020-09-29T19:57:21.000Z", "max_forks_repo_path": "nodejs/js/aluraframe/client/js/app-es6/helper/Bind.js", "max_forks_repo_name": "wesleyegberto/courses", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 15, "max_forks_count": null, "avg_line_length": 26.9230769231, "max_line_length": 79, "alphanum_fraction": 0.6628571429}
import { ProxyFactory } from './ProxyFactory';

export class Bind {
  /**
   * Cria um Bind entre o model e a view, efetuando atualizacoes
   * quando props é alterado/invocado.
   */
  constructor(model, view, ...props) {
    let proxy = ProxyFactory.create(model, props, model => view.update(model));
    view.update(model);
    return proxy;
  }
}