import { useState } from "react";

/*
    Executes before Render
*/
export const useConstructor = (callBack = () => {}) => {
    const [hasBeenCalled, setHasBeenCalled] = useState(false);
    if (hasBeenCalled) return;
    callBack();
    setHasBeenCalled(true);
}

export const capitalize = (str) => str.charAt(0).toUpperCase() + str.substring(1,str.length).toLowerCase()

