MCPcopy Index your code
hub / github.com/TruthHun/BookStack / bindObjectProps

Function bindObjectProps

static/vuejs/vue.runtime.esm.js:3459–3492  ·  view source on GitHub ↗

* Runtime helper for merging v-bind="object" into a VNode's data.

(
  data,
  tag,
  value,
  asProp
)

Source from the content-addressed store, hash-verified

3457 * Runtime helper for merging v-bind="object" into a VNode's data.
3458 */
3459function bindObjectProps (
3460 data,
3461 tag,
3462 value,
3463 asProp
3464) {
3465 if (value) {
3466 if (!isObject(value)) {
3467 process.env.NODE_ENV !== 'production' && warn(
3468 'v-bind without argument expects an Object or Array value',
3469 this
3470 );
3471 } else {
3472 if (Array.isArray(value)) {
3473 value = toObject(value);
3474 }
3475 var hash;
3476 for (var key in value) {
3477 if (key === 'class' || key === 'style') {
3478 hash = data;
3479 } else {
3480 var type = data.attrs && data.attrs.type;
3481 hash = asProp || config.mustUseProp(tag, type, key)
3482 ? data.domProps || (data.domProps = {})
3483 : data.attrs || (data.attrs = {});
3484 }
3485 if (!(key in hash)) {
3486 hash[key] = value[key];
3487 }
3488 }
3489 }
3490 }
3491 return data
3492}
3493
3494/* */
3495

Callers

nothing calls this directly

Calls 3

isObjectFunction · 0.70
toObjectFunction · 0.70
warnFunction · 0.50

Tested by

no test coverage detected