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

Function defineComputed

static/vuejs/vue.runtime.esm.js:2785–2800  ·  view source on GitHub ↗
(target, key, userDef)

Source from the content-addressed store, hash-verified

2783}
2784
2785function defineComputed (target, key, userDef) {
2786 if (typeof userDef === 'function') {
2787 sharedPropertyDefinition.get = createComputedGetter(key);
2788 sharedPropertyDefinition.set = noop;
2789 } else {
2790 sharedPropertyDefinition.get = userDef.get
2791 ? userDef.cache !== false
2792 ? createComputedGetter(key)
2793 : userDef.get
2794 : noop;
2795 sharedPropertyDefinition.set = userDef.set
2796 ? userDef.set
2797 : noop;
2798 }
2799 Object.defineProperty(target, key, sharedPropertyDefinition);
2800}
2801
2802function createComputedGetter (key) {
2803 return function computedGetter () {

Callers 2

initComputedFunction · 0.70
initComputed$1Function · 0.70

Calls 1

createComputedGetterFunction · 0.70

Tested by

no test coverage detected