code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function cloneVNode (vnode, deep) { const componentOptions = vnode.componentOptions; const cloned = new VNode( vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, componentOptions, vnode.asyncFactory ); cloned.ns = vnode.ns; cloned.isStatic = vnode.isSt...
A dep is an observable that can have multiple directives subscribing to it.
cloneVNode
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function cloneVNodes (vnodes, deep) { const len = vnodes.length; const res = new Array(len); for (let i = 0; i < len; i++) { res[i] = cloneVNode(vnodes[i], deep); } return res }
A dep is an observable that can have multiple directives subscribing to it.
cloneVNodes
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
constructor (value) { this.value = value; this.dep = new Dep(); this.vmCount = 0; def(value, '__ob__', this); if (Array.isArray(value)) { const augment = hasProto ? protoAugment : copyAugment; augment(value, arrayMethods, arrayKeys); this.observeArray(value); } ...
Observer class that are attached to each observed object. Once attached, the observer converts target object's property keys into getter/setters that collect dependencies and dispatches updates.
constructor
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
walk (obj) { const keys = Object.keys(obj); for (let i = 0; i < keys.length; i++) { defineReactive(obj, keys[i], obj[keys[i]]); } }
Walk through each property and convert them into getter/setters. This method should only be called when value type is Object.
walk
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function protoAugment (target, src, keys) { /* eslint-disable no-proto */ target.__proto__ = src; /* eslint-enable no-proto */ }
Augment an target Object or Array by intercepting the prototype chain using __proto__
protoAugment
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function copyAugment (target, src, keys) { for (let i = 0, l = keys.length; i < l; i++) { const key = keys[i]; def(target, key, src[key]); } }
Augment an target Object or Array by defining hidden properties.
copyAugment
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function observe (value, asRootData) { if (!isObject(value) || value instanceof VNode) { return } let ob; if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { ob = value.__ob__; } else if ( observerState.shouldConvert && !isServerRendering() && (Array.isArray(value) || isPlai...
Attempt to create an observer instance for a value, returns the new observer if successfully observed, or the existing observer if the value already has one.
observe
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function defineReactive ( obj, key, val, customSetter, shallow ) { const dep = new Dep(); const property = Object.getOwnPropertyDescriptor(obj, key); if (property && property.configurable === false) { return } // cater for pre-defined getter/setters const getter = property && property.get; ...
Define a reactive property on an Object.
defineReactive
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function set (target, key, val) { if (Array.isArray(target) && isValidArrayIndex(key)) { target.length = Math.max(target.length, key); target.splice(key, 1, val); return val } if (key in target && !(key in Object.prototype)) { target[key] = val; return val } const ob = (target).__ob__; i...
Set a property on an object. Adds the new property and triggers change notification if the property doesn't already exist.
set
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function del (target, key) { if (Array.isArray(target) && isValidArrayIndex(key)) { target.splice(key, 1); return } const ob = (target).__ob__; if (target._isVue || (ob && ob.vmCount)) { "development" !== 'production' && warn( 'Avoid deleting properties on a Vue instance or its root $data ' + ...
Delete a property and trigger change if necessary.
del
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function dependArray (value) { for (let e, i = 0, l = value.length; i < l; i++) { e = value[i]; e && e.__ob__ && e.__ob__.dep.depend(); if (Array.isArray(e)) { dependArray(e); } } }
Collect dependencies on array elements when the array is touched, since we cannot intercept array element access like property getters.
dependArray
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function mergeData (to, from) { if (!from) return to let key, toVal, fromVal; const keys = Object.keys(from); for (let i = 0; i < keys.length; i++) { key = keys[i]; toVal = to[key]; fromVal = from[key]; if (!hasOwn(to, key)) { set(to, key, fromVal); } else if (isPlainObject(toVal) && i...
Helper that recursively merges two data objects together.
mergeData
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function mergeHook ( parentVal, childVal ) { return childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal }
Hooks and props are merged as arrays.
mergeHook
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function mergeAssets ( parentVal, childVal, vm, key ) { const res = Object.create(parentVal || null); if (childVal) { "development" !== 'production' && assertObjectType(key, childVal, vm); return extend(res, childVal) } else { return res } }
Assets When a vm is present (instance creation), we need to do a three-way merge between constructor options, instance options and parent options.
mergeAssets
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function normalizeProps (options, vm) { const props = options.props; if (!props) return const res = {}; let i, val, name; if (Array.isArray(props)) { i = props.length; while (i--) { val = props[i]; if (typeof val === 'string') { name = camelize(val); res[name] = { type: nul...
Ensure all props option syntax are normalized into the Object-based format.
normalizeProps
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function normalizeInject (options, vm) { const inject = options.inject; const normalized = options.inject = {}; if (Array.isArray(inject)) { for (let i = 0; i < inject.length; i++) { normalized[inject[i]] = { from: inject[i] }; } } else if (isPlainObject(inject)) { for (const key in inject) { ...
Normalize all injections into Object-based format
normalizeInject
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function normalizeDirectives (options) { const dirs = options.directives; if (dirs) { for (const key in dirs) { const def = dirs[key]; if (typeof def === 'function') { dirs[key] = { bind: def, update: def }; } } } }
Normalize raw function directives into object format.
normalizeDirectives
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function assertObjectType (name, value, vm) { if (!isPlainObject(value)) { warn( `Invalid value for option "${name}": expected an Object, ` + `but got ${toRawType(value)}.`, vm ); } }
Normalize raw function directives into object format.
assertObjectType
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function mergeOptions ( parent, child, vm ) { { checkComponents(child); } if (typeof child === 'function') { child = child.options; } normalizeProps(child, vm); normalizeInject(child, vm); normalizeDirectives(child); const extendsFrom = child.extends; if (extendsFrom) { parent = me...
Merge two option objects into a new one. Core utility used in both instantiation and inheritance.
mergeOptions
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function mergeField (key) { const strat = strats[key] || defaultStrat; options[key] = strat(parent[key], child[key], vm, key); }
Merge two option objects into a new one. Core utility used in both instantiation and inheritance.
mergeField
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function resolveAsset ( options, type, id, warnMissing ) { /* istanbul ignore if */ if (typeof id !== 'string') { return } const assets = options[type]; // check local registration variations first if (hasOwn(assets, id)) return assets[id] const camelizedId = camelize(id); if (hasOwn(assets,...
Resolve an asset. This function is used because child instances need access to assets defined in its ancestor chain.
resolveAsset
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function validateProp ( key, propOptions, propsData, vm ) { const prop = propOptions[key]; const absent = !hasOwn(propsData, key); let value = propsData[key]; // handle boolean props if (isType(Boolean, prop.type)) { if (absent && !hasOwn(prop, 'default')) { value = false; } else if (!is...
Resolve an asset. This function is used because child instances need access to assets defined in its ancestor chain.
validateProp
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function getPropDefaultValue (vm, prop, key) { // no default, return undefined if (!hasOwn(prop, 'default')) { return undefined } const def = prop.default; // warn against non-factory defaults for Object & Array if ("development" !== 'production' && isObject(def)) { warn( 'Invalid default valu...
Get the default value of a prop.
getPropDefaultValue
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function getType (fn) { const match = fn && fn.toString().match(/^\s*function (\w+)/); return match ? match[1] : '' }
Use function string name to check built-in types, because a simple equality check will fail when running across different vms / iframes.
getType
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function isType (type, fn) { if (!Array.isArray(fn)) { return getType(fn) === getType(type) } for (let i = 0, len = fn.length; i < len; i++) { if (getType(fn[i]) === getType(type)) { return true } } /* istanbul ignore next */ return false }
Use function string name to check built-in types, because a simple equality check will fail when running across different vms / iframes.
isType
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function handleError (err, vm, info) { if (vm) { let cur = vm; while ((cur = cur.$parent)) { const hooks = cur.$options.errorCaptured; if (hooks) { for (let i = 0; i < hooks.length; i++) { try { const capture = hooks[i].call(cur, err, vm, info) === false; ...
Use function string name to check built-in types, because a simple equality check will fail when running across different vms / iframes.
handleError
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function globalHandleError (err, vm, info) { if (config.errorHandler) { try { return config.errorHandler.call(null, err, vm, info) } catch (e) { logError(e, null, 'config.errorHandler'); } } logError(err, vm, info); }
Use function string name to check built-in types, because a simple equality check will fail when running across different vms / iframes.
globalHandleError
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function logError (err, vm, info) { { warn(`Error in ${info}: "${err.toString()}"`, vm); } /* istanbul ignore else */ if ((inBrowser || inWeex) && typeof console !== 'undefined') { console.error(err); } else { throw err } }
Use function string name to check built-in types, because a simple equality check will fail when running across different vms / iframes.
logError
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function flushCallbacks () { pending = false; const copies = callbacks.slice(0); callbacks.length = 0; for (let i = 0; i < copies.length; i++) { copies[i](); } }
Use function string name to check built-in types, because a simple equality check will fail when running across different vms / iframes.
flushCallbacks
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function withMacroTask (fn) { return fn._withTask || (fn._withTask = function () { useMacroTask = true; const res = fn.apply(null, arguments); useMacroTask = false; return res }) }
Wrap a function so that if any code inside triggers state change, the changes are queued using a Task instead of a MicroTask.
withMacroTask
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function nextTick (cb, ctx) { let _resolve; callbacks.push(() => { if (cb) { try { cb.call(ctx); } catch (e) { handleError(e, ctx, 'nextTick'); } } else if (_resolve) { _resolve(ctx); } }); if (!pending) { pending = true; if (useMacroTask) { macr...
Wrap a function so that if any code inside triggers state change, the changes are queued using a Task instead of a MicroTask.
nextTick
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
warnNonPresent = (target, key) => { warn( `Property or method "${key}" is not defined on the instance but ` + 'referenced during render. Make sure that this property is reactive, ' + 'either in the data option, or for class-based components, by ' + 'initializing the property. ' + 'See:...
Wrap a function so that if any code inside triggers state change, the changes are queued using a Task instead of a MicroTask.
warnNonPresent
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
warnNonPresent = (target, key) => { warn( `Property or method "${key}" is not defined on the instance but ` + 'referenced during render. Make sure that this property is reactive, ' + 'either in the data option, or for class-based components, by ' + 'initializing the property. ' + 'See:...
Wrap a function so that if any code inside triggers state change, the changes are queued using a Task instead of a MicroTask.
warnNonPresent
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
set (target, key, value) { if (isBuiltInModifier(key)) { warn(`Avoid overwriting built-in modifier in config.keyCodes: .${key}`); return false } else { target[key] = value; return true } }
Wrap a function so that if any code inside triggers state change, the changes are queued using a Task instead of a MicroTask.
set
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
has (target, key) { const has = key in target; const isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; if (!has && !isAllowed) { warnNonPresent(target, key); } return has || !isAllowed }
Wrap a function so that if any code inside triggers state change, the changes are queued using a Task instead of a MicroTask.
has
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
get (target, key) { if (typeof key === 'string' && !(key in target)) { warnNonPresent(target, key); } return target[key] }
Wrap a function so that if any code inside triggers state change, the changes are queued using a Task instead of a MicroTask.
get
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function traverse (val) { _traverse(val, seenObjects); seenObjects.clear(); }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
traverse
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function _traverse (val, seen) { let i, keys; const isA = Array.isArray(val); if ((!isA && !isObject(val)) || Object.isFrozen(val)) { return } if (val.__ob__) { const depId = val.__ob__.dep.id; if (seen.has(depId)) { return } seen.add(depId); } if (isA) { i = val.length; ...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
_traverse
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function createFnInvoker (fns) { function invoker () { const fns = invoker.fns; if (Array.isArray(fns)) { const cloned = fns.slice(); for (let i = 0; i < cloned.length; i++) { cloned[i].apply(null, arguments); } } else { // return handler return value for single handlers ...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
createFnInvoker
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function invoker () { const fns = invoker.fns; if (Array.isArray(fns)) { const cloned = fns.slice(); for (let i = 0; i < cloned.length; i++) { cloned[i].apply(null, arguments); } } else { // return handler return value for single handlers return fns.apply(null, argument...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
invoker
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function updateListeners ( on, oldOn, add, remove$$1, vm ) { let name, cur, old, event; for (name in on) { cur = on[name]; old = oldOn[name]; event = normalizeEvent(name); if (isUndef(cur)) { "development" !== 'production' && warn( `Invalid handler for event "${event.name}": ...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
updateListeners
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function mergeVNodeHook (def, hookKey, hook) { if (def instanceof VNode) { def = def.data.hook || (def.data.hook = {}); } let invoker; const oldHook = def[hookKey]; function wrappedHook () { hook.apply(this, arguments); // important: remove merged hook to ensure it's called only once // and p...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
mergeVNodeHook
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function wrappedHook () { hook.apply(this, arguments); // important: remove merged hook to ensure it's called only once // and prevent memory leak remove(invoker.fns, wrappedHook); }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
wrappedHook
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function extractPropsFromVNodeData ( data, Ctor, tag ) { // we are only extracting raw values here. // validation and default values are handled in the child // component itself. const propOptions = Ctor.options.props; if (isUndef(propOptions)) { return } const res = {}; const { attrs, props }...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
extractPropsFromVNodeData
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function checkProp ( res, hash, key, altKey, preserve ) { if (isDef(hash)) { if (hasOwn(hash, key)) { res[key] = hash[key]; if (!preserve) { delete hash[key]; } return true } else if (hasOwn(hash, altKey)) { res[key] = hash[altKey]; if (!preserve) { ...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
checkProp
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function simpleNormalizeChildren (children) { for (let i = 0; i < children.length; i++) { if (Array.isArray(children[i])) { return Array.prototype.concat.apply([], children) } } return children }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
simpleNormalizeChildren
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function normalizeChildren (children) { return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
normalizeChildren
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function isTextNode (node) { return isDef(node) && isDef(node.text) && isFalse(node.isComment) }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
isTextNode
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function normalizeArrayChildren (children, nestedIndex) { const res = []; let i, c, lastIndex, last; for (i = 0; i < children.length; i++) { c = children[i]; if (isUndef(c) || typeof c === 'boolean') continue lastIndex = res.length - 1; last = res[lastIndex]; // nested if (Array.isArray(c...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
normalizeArrayChildren
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function ensureCtor (comp, base) { if ( comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module') ) { comp = comp.default; } return isObject(comp) ? base.extend(comp) : comp }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
ensureCtor
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function createAsyncPlaceholder ( factory, data, context, children, tag ) { const node = createEmptyVNode(); node.asyncFactory = factory; node.asyncMeta = { data, context, children, tag }; return node }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
createAsyncPlaceholder
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function resolveAsyncComponent ( factory, baseCtor, context ) { if (isTrue(factory.error) && isDef(factory.errorComp)) { return factory.errorComp } if (isDef(factory.resolved)) { return factory.resolved } if (isTrue(factory.loading) && isDef(factory.loadingComp)) { return factory.loadingCo...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
resolveAsyncComponent
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
forceRender = () => { for (let i = 0, l = contexts.length; i < l; i++) { contexts[i].$forceUpdate(); } }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
forceRender
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
forceRender = () => { for (let i = 0, l = contexts.length; i < l; i++) { contexts[i].$forceUpdate(); } }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
forceRender
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function isAsyncPlaceholder (node) { return node.isComment && node.asyncFactory }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
isAsyncPlaceholder
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function getFirstComponentChild (children) { if (Array.isArray(children)) { for (let i = 0; i < children.length; i++) { const c = children[i]; if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { return c } } } }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
getFirstComponentChild
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initEvents (vm) { vm._events = Object.create(null); vm._hasHookEvent = false; // init parent attached events const listeners = vm.$options._parentListeners; if (listeners) { updateComponentListeners(vm, listeners); } }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
initEvents
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function add (event, fn, once) { if (once) { target.$once(event, fn); } else { target.$on(event, fn); } }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
add
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function remove$1 (event, fn) { target.$off(event, fn); }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
remove$1
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function updateComponentListeners ( vm, listeners, oldListeners ) { target = vm; updateListeners(listeners, oldListeners || {}, add, remove$1, vm); target = undefined; }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
updateComponentListeners
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function eventsMixin (Vue) { const hookRE = /^hook:/; Vue.prototype.$on = function (event, fn) { const vm = this; if (Array.isArray(event)) { for (let i = 0, l = event.length; i < l; i++) { this.$on(event[i], fn); } } else { (vm._events[event] || (vm._events[event] = [])).push(...
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
eventsMixin
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function on () { vm.$off(event, on); fn.apply(vm, arguments); }
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
on
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function resolveSlots ( children, context ) { const slots = {}; if (!children) { return slots } for (let i = 0, l = children.length; i < l; i++) { const child = children[i]; const data = child.data; // remove slot attribute if the node is resolved as a Vue slot node if (data && data.attr...
Runtime helper for resolving raw children VNodes into a slot object.
resolveSlots
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function isWhitespace (node) { return (node.isComment && !node.asyncFactory) || node.text === ' ' }
Runtime helper for resolving raw children VNodes into a slot object.
isWhitespace
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function resolveScopedSlots ( fns, // see flow/vnode res ) { res = res || {}; for (let i = 0; i < fns.length; i++) { if (Array.isArray(fns[i])) { resolveScopedSlots(fns[i], res); } else { res[fns[i].key] = fns[i].fn; } } return res }
Runtime helper for resolving raw children VNodes into a slot object.
resolveScopedSlots
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initLifecycle (vm) { const options = vm.$options; // locate first non-abstract parent let parent = options.parent; if (parent && !options.abstract) { while (parent.$options.abstract && parent.$parent) { parent = parent.$parent; } parent.$children.push(vm); } vm.$parent = parent;...
Runtime helper for resolving raw children VNodes into a slot object.
initLifecycle
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function lifecycleMixin (Vue) { Vue.prototype._update = function (vnode, hydrating) { const vm = this; if (vm._isMounted) { callHook(vm, 'beforeUpdate'); } const prevEl = vm.$el; const prevVnode = vm._vnode; const prevActiveInstance = activeInstance; activeInstance = vm; vm._vnod...
Runtime helper for resolving raw children VNodes into a slot object.
lifecycleMixin
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function mountComponent ( vm, el, hydrating ) { vm.$el = el; if (!vm.$options.render) { vm.$options.render = createEmptyVNode; { /* istanbul ignore if */ if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') || vm.$options.el || el) { warn( 'You are...
Runtime helper for resolving raw children VNodes into a slot object.
mountComponent
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function updateChildComponent ( vm, propsData, listeners, parentVnode, renderChildren ) { { isUpdatingChildComponent = true; } // determine whether component has slot children // we need to do this before overwriting $options._renderChildren const hasChildren = !!( renderChildren || ...
Runtime helper for resolving raw children VNodes into a slot object.
updateChildComponent
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function isInInactiveTree (vm) { while (vm && (vm = vm.$parent)) { if (vm._inactive) return true } return false }
Runtime helper for resolving raw children VNodes into a slot object.
isInInactiveTree
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function activateChildComponent (vm, direct) { if (direct) { vm._directInactive = false; if (isInInactiveTree(vm)) { return } } else if (vm._directInactive) { return } if (vm._inactive || vm._inactive === null) { vm._inactive = false; for (let i = 0; i < vm.$children.length; i++) {...
Runtime helper for resolving raw children VNodes into a slot object.
activateChildComponent
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function deactivateChildComponent (vm, direct) { if (direct) { vm._directInactive = true; if (isInInactiveTree(vm)) { return } } if (!vm._inactive) { vm._inactive = true; for (let i = 0; i < vm.$children.length; i++) { deactivateChildComponent(vm.$children[i]); } callHook(v...
Runtime helper for resolving raw children VNodes into a slot object.
deactivateChildComponent
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function callHook (vm, hook) { const handlers = vm.$options[hook]; if (handlers) { for (let i = 0, j = handlers.length; i < j; i++) { try { handlers[i].call(vm); } catch (e) { handleError(e, vm, `${hook} hook`); } } } if (vm._hasHookEvent) { vm.$emit('hook:' + hook)...
Runtime helper for resolving raw children VNodes into a slot object.
callHook
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function flushSchedulerQueue () { flushing = true; let watcher, id; // Sort queue before flush. // This ensures that: // 1. Components are updated from parent to child. (because parent is always // created before the child) // 2. A component's user watchers are run before its render watcher (because ...
Flush both queues and run the watchers.
flushSchedulerQueue
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function callUpdatedHooks (queue) { let i = queue.length; while (i--) { const watcher = queue[i]; const vm = watcher.vm; if (vm._watcher === watcher && vm._isMounted) { callHook(vm, 'updated'); } } }
Flush both queues and run the watchers.
callUpdatedHooks
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function queueActivatedComponent (vm) { // setting _inactive to false here so that a render function can // rely on checking whether it's in an inactive tree (e.g. router-view) vm._inactive = false; activatedChildren.push(vm); }
Queue a kept-alive component that was activated during patch. The queue will be processed after the entire tree has been patched.
queueActivatedComponent
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function callActivatedHooks (queue) { for (let i = 0; i < queue.length; i++) { queue[i]._inactive = true; activateChildComponent(queue[i], true /* true */); } }
Queue a kept-alive component that was activated during patch. The queue will be processed after the entire tree has been patched.
callActivatedHooks
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function queueWatcher (watcher) { const id = watcher.id; if (has[id] == null) { has[id] = true; if (!flushing) { queue.push(watcher); } else { // if already flushing, splice the watcher based on its id // if already past its id, it will be run next immediately. let i = queue.leng...
Push a watcher into the watcher queue. Jobs with duplicate IDs will be skipped unless it's pushed when the queue is being flushed.
queueWatcher
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
constructor ( vm, expOrFn, cb, options ) { this.vm = vm; vm._watchers.push(this); // options if (options) { this.deep = !!options.deep; this.user = !!options.user; this.lazy = !!options.lazy; this.sync = !!options.sync; } else { this.deep = this.user =...
A watcher parses an expression, collects dependencies, and fires callback when the expression value changes. This is used for both the $watch() api and directives.
constructor
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
get () { pushTarget(this); let value; const vm = this.vm; try { value = this.getter.call(vm, vm); } catch (e) { if (this.user) { handleError(e, vm, `getter for watcher "${this.expression}"`); } else { throw e } } finally { // "touch" every property s...
Evaluate the getter, and re-collect dependencies.
get
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
update () { /* istanbul ignore else */ if (this.lazy) { this.dirty = true; } else if (this.sync) { this.run(); } else { queueWatcher(this); } }
Subscriber interface. Will be called when a dependency changes.
update
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
run () { if (this.active) { const value = this.get(); if ( value !== this.value || // Deep watchers and watchers on Object/Arrays should fire even // when the value is the same, because the value may // have mutated. isObject(value) || this.deep ) { ...
Scheduler job interface. Will be called by the scheduler.
run
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
evaluate () { this.value = this.get(); this.dirty = false; }
Evaluate the value of the watcher. This only gets called for lazy watchers.
evaluate
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
depend () { let i = this.deps.length; while (i--) { this.deps[i].depend(); } }
Depend on all deps collected by this watcher.
depend
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
teardown () { if (this.active) { // remove self from vm's watcher list // this is a somewhat expensive operation so we skip it // if the vm is being destroyed. if (!this.vm._isBeingDestroyed) { remove(this.vm._watchers, this); } let i = this.deps.length; while (i--)...
Remove self from all dependencies' subscriber list.
teardown
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function proxy (target, sourceKey, key) { sharedPropertyDefinition.get = function proxyGetter () { return this[sourceKey][key] }; sharedPropertyDefinition.set = function proxySetter (val) { this[sourceKey][key] = val; }; Object.defineProperty(target, key, sharedPropertyDefinition); }
Remove self from all dependencies' subscriber list.
proxy
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initState (vm) { vm._watchers = []; const opts = vm.$options; if (opts.props) initProps(vm, opts.props); if (opts.methods) initMethods(vm, opts.methods); if (opts.data) { initData(vm); } else { observe(vm._data = {}, true /* asRootData */); } if (opts.computed) initComputed(vm, opts.com...
Remove self from all dependencies' subscriber list.
initState
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initProps (vm, propsOptions) { const propsData = vm.$options.propsData || {}; const props = vm._props = {}; // cache prop keys so that future props updates can iterate using Array // instead of dynamic object key enumeration. const keys = vm.$options._propKeys = []; const isRoot = !vm.$parent; //...
Remove self from all dependencies' subscriber list.
initProps
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initData (vm) { let data = vm.$options.data; data = vm._data = typeof data === 'function' ? getData(data, vm) : data || {}; if (!isPlainObject(data)) { data = {}; "development" !== 'production' && warn( 'data functions should return an object:\n' + 'https://vuejs.org/v2/guide/...
Remove self from all dependencies' subscriber list.
initData
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function getData (data, vm) { try { return data.call(vm, vm) } catch (e) { handleError(e, vm, `data()`); return {} } }
Remove self from all dependencies' subscriber list.
getData
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initComputed (vm, computed) { const watchers = vm._computedWatchers = Object.create(null); // computed properties are just getters during SSR const isSSR = isServerRendering(); for (const key in computed) { const userDef = computed[key]; const getter = typeof userDef === 'function' ? userDef :...
Remove self from all dependencies' subscriber list.
initComputed
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function defineComputed ( target, key, userDef ) { const shouldCache = !isServerRendering(); if (typeof userDef === 'function') { sharedPropertyDefinition.get = shouldCache ? createComputedGetter(key) : userDef; sharedPropertyDefinition.set = noop; } else { sharedPropertyDefinition.g...
Remove self from all dependencies' subscriber list.
defineComputed
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function createComputedGetter (key) { return function computedGetter () { const watcher = this._computedWatchers && this._computedWatchers[key]; if (watcher) { if (watcher.dirty) { watcher.evaluate(); } if (Dep.target) { watcher.depend(); } return watcher.value ...
Remove self from all dependencies' subscriber list.
createComputedGetter
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initMethods (vm, methods) { const props = vm.$options.props; for (const key in methods) { { if (methods[key] == null) { warn( `Method "${key}" has an undefined value in the component definition. ` + `Did you reference the function correctly?`, vm ); ...
Remove self from all dependencies' subscriber list.
initMethods
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initWatch (vm, watch) { for (const key in watch) { const handler = watch[key]; if (Array.isArray(handler)) { for (let i = 0; i < handler.length; i++) { createWatcher(vm, key, handler[i]); } } else { createWatcher(vm, key, handler); } } }
Remove self from all dependencies' subscriber list.
initWatch
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function createWatcher ( vm, keyOrFn, handler, options ) { if (isPlainObject(handler)) { options = handler; handler = handler.handler; } if (typeof handler === 'string') { handler = vm[handler]; } return vm.$watch(keyOrFn, handler, options) }
Remove self from all dependencies' subscriber list.
createWatcher
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function stateMixin (Vue) { // flow somehow has problems with directly declared definition object // when using Object.defineProperty, so we have to procedurally build up // the object here. const dataDef = {}; dataDef.get = function () { return this._data }; const propsDef = {}; propsDef.get = function (...
Remove self from all dependencies' subscriber list.
stateMixin
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initProvide (vm) { const provide = vm.$options.provide; if (provide) { vm._provided = typeof provide === 'function' ? provide.call(vm) : provide; } }
Remove self from all dependencies' subscriber list.
initProvide
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function initInjections (vm) { const result = resolveInject(vm.$options.inject, vm); if (result) { observerState.shouldConvert = false; Object.keys(result).forEach(key => { /* istanbul ignore else */ { defineReactive(vm, key, result[key], () => { warn( `Avoid mutati...
Remove self from all dependencies' subscriber list.
initInjections
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT
function resolveInject (inject, vm) { if (inject) { // inject is :any because flow is not smart enough to figure out cached const result = Object.create(null); const keys = hasSymbol ? Reflect.ownKeys(inject).filter(key => { /* istanbul ignore next */ return Object.getOwnProper...
Remove self from all dependencies' subscriber list.
resolveInject
javascript
syzoj/syzoj
static/cdnjs/vue/2.5.21/vue.esm.browser.js
https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.browser.js
MIT