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 hasOwn (obj, key) {
return hasOwnProperty.call(obj, key)
} | Check whether an object has the property. | hasOwn | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function cached (fn) {
var cache = Object.create(null);
return (function cachedFn (str) {
var hit = cache[str];
return hit || (cache[str] = fn(str))
})
} | Create a cached version of a pure function. | cached | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function polyfillBind (fn, ctx) {
function boundFn (a) {
var l = arguments.length;
return l
? l > 1
? fn.apply(ctx, arguments)
: fn.call(ctx, a)
: fn.call(ctx)
}
boundFn._length = fn.length;
return boundFn
} | Simple bind polyfill for environments that do not support it,
e.g., PhantomJS 1.x. Technically, we don't need this anymore
since native bind is now performant enough in most browsers.
But removing it would mean breaking code that was able to run in
PhantomJS 1.x, so this must be kept for backward compatibility. | polyfillBind | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function boundFn (a) {
var l = arguments.length;
return l
? l > 1
? fn.apply(ctx, arguments)
: fn.call(ctx, a)
: fn.call(ctx)
} | Simple bind polyfill for environments that do not support it,
e.g., PhantomJS 1.x. Technically, we don't need this anymore
since native bind is now performant enough in most browsers.
But removing it would mean breaking code that was able to run in
PhantomJS 1.x, so this must be kept for backward compatibility. | boundFn | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function nativeBind (fn, ctx) {
return fn.bind(ctx)
} | Simple bind polyfill for environments that do not support it,
e.g., PhantomJS 1.x. Technically, we don't need this anymore
since native bind is now performant enough in most browsers.
But removing it would mean breaking code that was able to run in
PhantomJS 1.x, so this must be kept for backward compatibility. | nativeBind | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function toArray (list, start) {
start = start || 0;
var i = list.length - start;
var ret = new Array(i);
while (i--) {
ret[i] = list[i + start];
}
return ret
} | Convert an Array-like object to a real Array. | toArray | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function toObject (arr) {
var res = {};
for (var i = 0; i < arr.length; i++) {
if (arr[i]) {
extend(res, arr[i]);
}
}
return res
} | Merge an Array of Objects into a single Object. | toObject | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function genStaticKeys (modules) {
return modules.reduce(function (keys, m) {
return keys.concat(m.staticKeys || [])
}, []).join(',')
} | Generate a string containing static keys from compiler modules. | genStaticKeys | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function looseEqual (a, b) {
if (a === b) { return true }
var isObjectA = isObject(a);
var isObjectB = isObject(b);
if (isObjectA && isObjectB) {
try {
var isArrayA = Array.isArray(a);
var isArrayB = Array.isArray(b);
if (isArrayA && isArrayB) {
return a.length === b.length && a.ev... | Check if two values are loosely equal - that is,
if they are plain objects, do they have the same shape? | looseEqual | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function looseIndexOf (arr, val) {
for (var i = 0; i < arr.length; i++) {
if (looseEqual(arr[i], val)) { return i }
}
return -1
} | Return the first index at which a loosely equal value can be
found in the array (if value is a plain object, the array must
contain an object of the same shape), or -1 if it is not present. | looseIndexOf | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function once (fn) {
var called = false;
return function () {
if (!called) {
called = true;
fn.apply(this, arguments);
}
}
} | Ensure a function is called only once. | once | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function isReserved (str) {
var c = (str + '').charCodeAt(0);
return c === 0x24 || c === 0x5F
} | Check if a string starts with $ or _ | isReserved | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
Dep = function Dep () {
this.id = uid++;
this.subs = [];
} | A dep is an observable that can have multiple
directives subscribing to it. | Dep | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function pushTarget (target) {
targetStack.push(target);
Dep.target = target;
} | A dep is an observable that can have multiple
directives subscribing to it. | pushTarget | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function popTarget () {
targetStack.pop();
Dep.target = targetStack[targetStack.length - 1];
} | A dep is an observable that can have multiple
directives subscribing to it. | popTarget | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
VNode = function VNode (
tag,
data,
children,
text,
elm,
context,
componentOptions,
asyncFactory
) {
this.tag = tag;
this.data = data;
this.children = children;
this.text = text;
this.elm = elm;
this.ns = undefined;
this.context = context;
this.fnContext = undefined;
this.fnOptions = u... | A dep is an observable that can have multiple
directives subscribing to it. | VNode | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
createEmptyVNode = function (text) {
if ( text === void 0 ) text = '';
var node = new VNode();
node.text = text;
node.isComment = true;
return node
} | A dep is an observable that can have multiple
directives subscribing to it. | createEmptyVNode | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function createTextVNode (val) {
return new VNode(undefined, undefined, undefined, String(val))
} | A dep is an observable that can have multiple
directives subscribing to it. | createTextVNode | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function cloneVNode (vnode) {
var cloned = new VNode(
vnode.tag,
vnode.data,
// #7975
// clone children array to avoid mutating original in case of cloning
// a child.
vnode.children && vnode.children.slice(),
vnode.text,
vnode.elm,
vnode.context,
vnode.componentOptions,
vn... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function toggleObserving (value) {
shouldObserve = value;
} | In some cases we may want to disable observation inside a component's
update computation. | toggleObserving | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
Observer = function Observer (value) {
this.value = value;
this.dep = new Dep();
this.vmCount = 0;
def(value, '__ob__', this);
if (Array.isArray(value)) {
if (hasProto) {
protoAugment(value, arrayMethods);
} else {
copyAugment(value, arrayMethods, arrayKeys);
}
this.observeArray(va... | Observer class that is attached to each observed
object. Once attached, the observer converts the target
object's property keys into getter/setters that
collect dependencies and dispatch updates. | Observer | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function protoAugment (target, src) {
/* eslint-disable no-proto */
target.__proto__ = src;
/* eslint-enable no-proto */
} | Augment a target Object or Array by intercepting
the prototype chain using __proto__ | protoAugment | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function copyAugment (target, src, keys) {
for (var i = 0, l = keys.length; i < l; i++) {
var key = keys[i];
def(target, key, src[key]);
}
} | Augment a target Object or Array by defining
hidden properties. | copyAugment | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function observe (value, asRootData) {
if (!isObject(value) || value instanceof VNode) {
return
}
var ob;
if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
ob = value.__ob__;
} else if (
shouldObserve &&
!isServerRendering() &&
(Array.isArray(value) || isPlainObject(value)... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function defineReactive$$1 (
obj,
key,
val,
customSetter,
shallow
) {
var dep = new Dep();
var property = Object.getOwnPropertyDescriptor(obj, key);
if (property && property.configurable === false) {
return
}
// cater for pre-defined getter/setters
var getter = property && property.get;
va... | Define a reactive property on an Object. | defineReactive$$1 | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function set (target, key, val) {
if (process.env.NODE_ENV !== 'production' &&
(isUndef(target) || isPrimitive(target))
) {
warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
}
if (Array.isArray(target) && isValidArrayIndex(key)) {
target.length = Math.max(... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function del (target, key) {
if (process.env.NODE_ENV !== 'production' &&
(isUndef(target) || isPrimitive(target))
) {
warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
}
if (Array.isArray(target) && isValidArrayIndex(key)) {
target.splice(key, 1);
... | Delete a property and trigger change if necessary. | del | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function dependArray (value) {
for (var e = (void 0), 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function mergeData (to, from) {
if (!from) { return to }
var key, toVal, fromVal;
var keys = Object.keys(from);
for (var 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 (
toVal !== fromVa... | Helper that recursively merges two data objects together. | mergeData | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function mergeAssets (
parentVal,
childVal,
vm,
key
) {
var res = Object.create(parentVal || null);
if (childVal) {
process.env.NODE_ENV !== '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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function normalizeProps (options, vm) {
var props = options.props;
if (!props) { return }
var res = {};
var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function normalizeInject (options, vm) {
var inject = options.inject;
if (!inject) { return }
var normalized = options.inject = {};
if (Array.isArray(inject)) {
for (var i = 0; i < inject.length; i++) {
normalized[inject[i]] = { from: inject[i] };
}
} else if (isPlainObject(inject)) {
for (v... | Normalize all injections into Object-based format | normalizeInject | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function normalizeDirectives (options) {
var dirs = options.directives;
if (dirs) {
for (var key in dirs) {
var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function mergeOptions (
parent,
child,
vm
) {
if (process.env.NODE_ENV !== 'production') {
checkComponents(child);
}
if (typeof child === 'function') {
child = child.options;
}
normalizeProps(child, vm);
normalizeInject(child, vm);
normalizeDirectives(child);
// Apply extends and mixi... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function mergeField (key) {
var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function resolveAsset (
options,
type,
id,
warnMissing
) {
/* istanbul ignore if */
if (typeof id !== 'string') {
return
}
var assets = options[type];
// check local registration variations first
if (hasOwn(assets, id)) { return assets[id] }
var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function validateProp (
key,
propOptions,
propsData,
vm
) {
var prop = propOptions[key];
var absent = !hasOwn(propsData, key);
var value = propsData[key];
// boolean casting
var booleanIndex = getTypeIndex(Boolean, prop.type);
if (booleanIndex > -1) {
if (absent && !hasOwn(prop, 'default')) {
... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function getPropDefaultValue (vm, prop, key) {
// no default, return undefined
if (!hasOwn(prop, 'default')) {
return undefined
}
var def = prop.default;
// warn against non-factory defaults for Object & Array
if (process.env.NODE_ENV !== 'production' && isObject(def)) {
warn(
'Invalid default... | Get the default value of a prop. | getPropDefaultValue | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function getType (fn) {
var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function isSameType (a, b) {
return getType(a) === getType(b)
} | Use function string name to check built-in types,
because a simple equality check will fail when running
across different vms / iframes. | isSameType | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function getTypeIndex (type, expectedTypes) {
if (!Array.isArray(expectedTypes)) {
return isSameType(expectedTypes, type) ? 0 : -1
}
for (var i = 0, len = expectedTypes.length; i < len; i++) {
if (isSameType(expectedTypes[i], type)) {
return i
}
}
return -1
} | Use function string name to check built-in types,
because a simple equality check will fail when running
across different vms / iframes. | getTypeIndex | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function getInvalidTypeMessage (name, value, expectedTypes) {
var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
" Expected " + (expectedTypes.map(capitalize).join(', '));
var expectedType = expectedTypes[0];
var receivedType = toRawType(value);
var expectedValue = styleValue(value... | Use function string name to check built-in types,
because a simple equality check will fail when running
across different vms / iframes. | getInvalidTypeMessage | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function styleValue (value, type) {
if (type === 'String') {
return ("\"" + value + "\"")
} else if (type === 'Number') {
return ("" + (Number(value)))
} else {
return ("" + value)
}
} | Use function string name to check built-in types,
because a simple equality check will fail when running
across different vms / iframes. | styleValue | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function isExplicable (value) {
var explicitTypes = ['string', 'number', 'boolean'];
return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
} | Use function string name to check built-in types,
because a simple equality check will fail when running
across different vms / iframes. | isExplicable | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function isBoolean () {
var args = [], len = arguments.length;
while ( len-- ) args[ len ] = arguments[ len ];
return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
} | Use function string name to check built-in types,
because a simple equality check will fail when running
across different vms / iframes. | isBoolean | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function handleError (err, vm, info) {
if (vm) {
var cur = vm;
while ((cur = cur.$parent)) {
var hooks = cur.$options.errorCaptured;
if (hooks) {
for (var i = 0; i < hooks.length; i++) {
try {
var capture = hooks[i].call(cur, err, vm, info) === false;
if (... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function logError (err, vm, info) {
if (process.env.NODE_ENV !== 'production') {
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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function flushCallbacks () {
pending = false;
var copies = callbacks.slice(0);
callbacks.length = 0;
for (var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function withMacroTask (fn) {
return fn._withTask || (fn._withTask = function () {
useMacroTask = true;
try {
return fn.apply(null, arguments)
} finally {
useMacroTask = false;
}
})
} | Wrap a function so that if any code inside triggers state change,
the changes are queued using a (macro) task instead of a microtask. | withMacroTask | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function nextTick (cb, ctx) {
var _resolve;
callbacks.push(function () {
if (cb) {
try {
cb.call(ctx);
} catch (e) {
handleError(e, ctx, 'nextTick');
}
} else if (_resolve) {
_resolve(ctx);
}
});
if (!pending) {
pending = true;
if (useMacroTask) {
... | Wrap a function so that if any code inside triggers state change,
the changes are queued using a (macro) task instead of a microtask. | nextTick | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
warnNonPresent = function (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. ' ... | Wrap a function so that if any code inside triggers state change,
the changes are queued using a (macro) task instead of a microtask. | warnNonPresent | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
warnReservedPrefix = function (target, key) {
warn(
"Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
'prevent conflicts with Vue internals' +
'See: https://vuejs.org/v2/api/#data'... | Wrap a function so that if any code inside triggers state change,
the changes are queued using a (macro) task instead of a microtask. | warnReservedPrefix | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function _traverse (val, seen) {
var i, keys;
var isA = Array.isArray(val);
if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
return
}
if (val.__ob__) {
var depId = val.__ob__.dep.id;
if (seen.has(depId)) {
return
}
seen.add(depId);
}
if (isA) {
... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function createFnInvoker (fns) {
function invoker () {
var arguments$1 = arguments;
var fns = invoker.fns;
if (Array.isArray(fns)) {
var cloned = fns.slice();
for (var i = 0; i < cloned.length; i++) {
cloned[i].apply(null, arguments$1);
}
} else {
// return handler ret... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function invoker () {
var arguments$1 = arguments;
var fns = invoker.fns;
if (Array.isArray(fns)) {
var cloned = fns.slice();
for (var i = 0; i < cloned.length; i++) {
cloned[i].apply(null, arguments$1);
}
} 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. | invoker | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function updateListeners (
on,
oldOn,
add,
remove$$1,
createOnceHandler,
vm
) {
var name, def$$1, cur, old, event;
for (name in on) {
def$$1 = cur = on[name];
old = oldOn[name];
event = normalizeEvent(name);
if (isUndef(cur)) {
process.env.NODE_ENV !== 'production' && warn(
... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function mergeVNodeHook (def, hookKey, hook) {
if (def instanceof VNode) {
def = def.data.hook || (def.data.hook = {});
}
var invoker;
var oldHook = def[hookKey];
function wrappedHook () {
hook.apply(this, arguments);
// important: remove merged hook to ensure it's called only once
// and pre... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.
var propOptions = Ctor.options.props;
if (isUndef(propOptions)) {
return
}
var res = {};
var attrs = data.attrs;
... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function simpleNormalizeChildren (children) {
for (var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function normalizeArrayChildren (children, nestedIndex) {
var res = [];
var 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... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function createAsyncPlaceholder (
factory,
data,
context,
children,
tag
) {
var node = createEmptyVNode();
node.asyncFactory = factory;
node.asyncMeta = { data: data, context: context, children: children, tag: 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
forceRender = function (renderCompleted) {
for (var i = 0, l = contexts.length; i < l; i++) {
contexts[i].$forceUpdate();
}
if (renderCompleted) {
contexts.length = 0;
}
} | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function getFirstComponentChild (children) {
if (Array.isArray(children)) {
for (var i = 0; i < children.length; i++) {
var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function initEvents (vm) {
vm._events = Object.create(null);
vm._hasHookEvent = false;
// init parent attached events
var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function add (event, fn) {
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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function createOnceHandler (event, fn) {
var _target = target;
return function onceHandler () {
var res = fn.apply(null, arguments);
if (res !== null) {
_target.$off(event, onceHandler);
}
}
} | Recursively traverse an object to evoke all converted
getters, so that every nested property inside the object
is collected as a "deep" dependency. | createOnceHandler | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function updateComponentListeners (
vm,
listeners,
oldListeners
) {
target = vm;
updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function eventsMixin (Vue) {
var hookRE = /^hook:/;
Vue.prototype.$on = function (event, fn) {
var vm = this;
if (Array.isArray(event)) {
for (var i = 0, l = event.length; i < l; i++) {
vm.$on(event[i], fn);
}
} else {
(vm._events[event] || (vm._events[event] = [])).push(fn);
... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function resolveSlots (
children,
context
) {
var slots = {};
if (!children) {
return slots
}
for (var i = 0, l = children.length; i < l; i++) {
var child = children[i];
var data = child.data;
// remove slot attribute if the node is resolved as a Vue slot node
if (data && data.attrs && d... | Runtime helper for resolving raw children VNodes into a slot object. | resolveSlots | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function resolveScopedSlots (
fns, // see flow/vnode
res
) {
res = res || {};
for (var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function setActiveInstance(vm) {
var prevActiveInstance = activeInstance;
activeInstance = vm;
return function () {
activeInstance = prevActiveInstance;
}
} | Runtime helper for resolving raw children VNodes into a slot object. | setActiveInstance | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function initLifecycle (vm) {
var options = vm.$options;
// locate first non-abstract parent
var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function lifecycleMixin (Vue) {
Vue.prototype._update = function (vnode, hydrating) {
var vm = this;
var prevEl = vm.$el;
var prevVnode = vm._vnode;
var restoreActiveInstance = setActiveInstance(vm);
vm._vnode = vnode;
// Vue.prototype.__patch__ is injected in entry points
// based on the ... | Runtime helper for resolving raw children VNodes into a slot object. | lifecycleMixin | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function mountComponent (
vm,
el,
hydrating
) {
vm.$el = el;
if (!vm.$options.render) {
vm.$options.render = createEmptyVNode;
if (process.env.NODE_ENV !== 'production') {
/* istanbul ignore if */
if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
vm.$options.e... | Runtime helper for resolving raw children VNodes into a slot object. | mountComponent | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function updateChildComponent (
vm,
propsData,
listeners,
parentVnode,
renderChildren
) {
if (process.env.NODE_ENV !== 'production') {
isUpdatingChildComponent = true;
}
// determine whether component has slot children
// we need to do this before overwriting $options._renderChildren
var hasChi... | Runtime helper for resolving raw children VNodes into a slot object. | updateChildComponent | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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 (var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function deactivateChildComponent (vm, direct) {
if (direct) {
vm._directInactive = true;
if (isInInactiveTree(vm)) {
return
}
}
if (!vm._inactive) {
vm._inactive = true;
for (var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function callHook (vm, hook) {
// #7573 disable dep collection when invoking lifecycle hooks
pushTarget();
var handlers = vm.$options[hook];
if (handlers) {
for (var i = 0, j = handlers.length; i < j; i++) {
try {
handlers[i].call(vm);
} catch (e) {
handleError(e, vm, (hook + " h... | Runtime helper for resolving raw children VNodes into a slot object. | callHook | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function flushSchedulerQueue () {
flushing = true;
var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function callUpdatedHooks (queue) {
var i = queue.length;
while (i--) {
var watcher = queue[i];
var vm = watcher.vm;
if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
callHook(vm, 'updated');
}
}
} | Flush both queues and run the watchers. | callUpdatedHooks | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function callActivatedHooks (queue) {
for (var 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
function queueWatcher (watcher) {
var 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.
var i = queue.length... | 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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
Watcher = function Watcher (
vm,
expOrFn,
cb,
options,
isRenderWatcher
) {
this.vm = vm;
if (isRenderWatcher) {
vm._watcher = this;
}
vm._watchers.push(this);
// options
if (options) {
this.deep = !!options.deep;
this.user = !!options.user;
this.lazy = !!options.lazy;
this.sync... | 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. | Watcher | javascript | syzoj/syzoj | static/cdnjs/vue/2.5.21/vue.esm.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.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.js | https://github.com/syzoj/syzoj/blob/master/static/cdnjs/vue/2.5.21/vue.esm.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.