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

Function initMethods

static/vuejs/vue.esm.js:2821–2841  ·  view source on GitHub ↗
(vm, methods)

Source from the content-addressed store, hash-verified

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