src/scheduler.js
function batchMethod (obj, method) {
  const descriptor = Object.getOwnPropertyDescriptor(obj, method)
  if (descriptor) {
    const newDescriptor = Object.assign({}, descriptor, {
      set (value) {
        return descriptor.set.call(this, batchFn(value))
      }
    })
    Object.defineProperty(obj, method, newDescriptor)
  }
}
function batchMethod (obj, method) {
  const descriptor = Object.getOwnPropertyDescriptor(obj, method)
  if (descriptor) {
    const newDescriptor = Object.assign({}, descriptor, {
      set (value) {
        return descriptor.set.call(this, batchFn(value))
      }
    })
    Object.defineProperty(obj, method, newDescriptor)
  }
}
function batchMethod ( obj , method ) { const descriptor = Object . getOwnPropertyDescriptor ( obj , method ) if ( descriptor ) { const newDescriptor = Object . assign ( { } , descriptor , { set ( value ) { return descriptor . set . call ( this , batchFn ( value ) ) } } ) Object . defineProperty ( obj , method , newDescriptor ) } }
batches obj.onevent = fn like calls
batches obj . onevent = fn like calls