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

Function initMethods

static/vuejs/vue.runtime.common.js:2819–2839  ·  view source on GitHub ↗
(vm, methods)

Source from the content-addressed store, hash-verified

2817}
2818
2819function initMethods (vm, methods) {
2820 var props = vm.$options.props;
2821 for (var key in methods) {
2822 vm[key] = methods[key] == null ? noop : bind(methods[key], vm);
2823 if (process.env.NODE_ENV !== 'production') {
2824 if (methods[key] == null) {
2825 warn(
2826 "method \"" + key + "\" has an undefined value in the component definition. " +
2827 "Did you reference the function correctly?",
2828 vm
2829 );
2830 }
2831 if (props && hasOwn(props, key)) {
2832 warn(
2833 ("method \"" + key + "\" has already been defined as a prop."),
2834 vm
2835 );
2836 }
2837 }
2838 }
2839}
2840
2841function initWatch (vm, watch) {
2842 for (var key in watch) {

Callers 1

initStateFunction · 0.70

Calls 3

bindFunction · 0.70
hasOwnFunction · 0.70
warnFunction · 0.50

Tested by

no test coverage detected