const objectFromParamString = function objectFromParamString(paramString) {
  const params = new URLSearchParams(paramString);
  return Object.fromEntries([...params].map(([key, value]) => {
    try {
      return [key, JSON.parse(value)];
    } catch (error) {
      return [key, value];
    }
  }));
};
export default objectFromParamString;