MCPcopy Index your code
hub / github.com/TruthHun/BookStack / del

Function del

static/vuejs/vue.runtime.esm.js:902–923  ·  view source on GitHub ↗

* Delete a property and trigger change if necessary.

(target, key)

Source from the content-addressed store, hash-verified

900 * Delete a property and trigger change if necessary.
901 */
902function del (target, key) {
903 if (Array.isArray(target) && typeof key === 'number') {
904 target.splice(key, 1);
905 return
906 }
907 var ob = (target ).__ob__;
908 if (target._isVue || (ob && ob.vmCount)) {
909 process.env.NODE_ENV !== 'production' && warn(
910 'Avoid deleting properties on a Vue instance or its root $data ' +
911 '- just set it to null.'
912 );
913 return
914 }
915 if (!hasOwn(target, key)) {
916 return
917 }
918 delete target[key];
919 if (!ob) {
920 return
921 }
922 ob.dep.notify();
923}
924
925/**
926 * Collect dependencies on array elements when the array is touched, since

Callers

nothing calls this directly

Calls 2

hasOwnFunction · 0.70
warnFunction · 0.50

Tested by

no test coverage detected