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

Function defineComputed

static/vuejs/vue.runtime.common.js:2787–2802  ·  view source on GitHub ↗
(target, key, userDef)

Source from the content-addressed store, hash-verified

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

Callers 2

initComputedFunction · 0.70
initComputed$1Function · 0.70

Calls 1

createComputedGetterFunction · 0.70

Tested by

no test coverage detected