MCPcopy Create free account
hub / github.com/TruthHun/BookStack / del

Function del

static/vuejs/vue.runtime.common.js:904–925  ·  view source on GitHub ↗

* Delete a property and trigger change if necessary.

(target, key)

Source from the content-addressed store, hash-verified

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