Unverified Commit 7b23d037 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera
Browse files

feat: add generateMethodsPlaceholder util

parent 725ede4a
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
import { watch } from "vue";
import { watch, reactive } from "vue";

export const debounce = (fn, time) => {
  let timeout;
@@ -70,3 +70,12 @@ export const resetWebpackIcon = (Icon) => {
    shadowUrl: require("leaflet/dist/images/marker-shadow.png"),
  });
};

export const generateMethodsPlaceholder = (methods) => {
  const base = reactive({});
  return methods.reduce((acc, curr) => {
    acc[curr] = () =>
      console.warn("This method has been invoked without being replaced ");
    return acc;
  }, base);
};