Commit bbe14d5d authored by Michael Underwood's avatar Michael Underwood
Browse files

Add `isFunction` helper util

parent 0c3835dc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ export const capitalizeFirstLetter = (string) => {
  return string.charAt(0).toUpperCase() + string.slice(1);
};

export const isFunction = (obj) => obj && typeof obj === "function";

export const propsBinder = (methods, leafletElement, props) => {
  for (const key in props) {
    const setMethodName = "set" + capitalizeFirstLetter(key);