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

Function del

static/vuejs/vue.runtime.js:908–929  ·  view source on GitHub ↗

* Delete a property and trigger change if necessary.

(target, key)

Source from the content-addressed store, hash-verified

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