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

Function defineComputed

static/vuejs/vue.js:2791–2806  ·  view source on GitHub ↗
(target, key, userDef)

Source from the content-addressed store, hash-verified

2789}
2790
2791function defineComputed (target, key, userDef) {
2792 if (typeof userDef === 'function') {
2793 sharedPropertyDefinition.get = createComputedGetter(key);
2794 sharedPropertyDefinition.set = noop;
2795 } else {
2796 sharedPropertyDefinition.get = userDef.get
2797 ? userDef.cache !== false
2798 ? createComputedGetter(key)
2799 : userDef.get
2800 : noop;
2801 sharedPropertyDefinition.set = userDef.set
2802 ? userDef.set
2803 : noop;
2804 }
2805 Object.defineProperty(target, key, sharedPropertyDefinition);
2806}
2807
2808function createComputedGetter (key) {
2809 return function computedGetter () {

Callers 2

initComputedFunction · 0.70
initComputed$1Function · 0.70

Calls 1

createComputedGetterFunction · 0.70

Tested by

no test coverage detected