Disable watch in Vue 2 when mutating data

This is a mixin for Vue 2

export default {
	methods: {
		$withoutWatchers(cb) {
			const watcher = {
				cb: this._watcher.cb,
				sync: this._watcher.sync,
			};

			this._watcher = Object.assign(this._watcher, { cb: () => null, sync: true });

			cb();

			this._watcher = Object.assign(this._watcher, watcher);
		},
	},
};

You can then use the method by passing in the mutation

methods: {
    sample () {
      this.$withoutWatchers(() => {
        // mutation goes here
        // ex: this.foo = "bar";
      })
    }
  },
Ability to disable/not trigger watch handler on data? · Issue #1829 · vuejs/vue
For my application, I’m mutating the object in my data: [{...}, {...}, {...}] to state changes occurring at other open instances of my application (happening through web sockets etc, etc). I have a...