SOURCE

function Dep () {
  this.subs = []
}

Dep.prototype = {
  addSubs: function (sub) {
    this.subs.push(sub)
  },
  notify: function () {
    this.subs.forEach(function (sub) {
      sub.update()
    })
  }
}

Dep.target = null
console 命令行工具 X clear

                    
>
console