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

Function defineComputed

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

Source from the content-addressed store, hash-verified

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

Callers 2

initComputedFunction · 0.70
initComputed$1Function · 0.70

Calls 1

createComputedGetterFunction · 0.70

Tested by

no test coverage detected