UNPKG

fastapi-rtk

Version:

A React component library for FastAPI in combination with FastAPI React Toolkit backend, built with Mantine, JsonForms, and Zustand.

15 lines (14 loc) 460 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const compareStateWithStore = (state, obj) => Object.entries(obj).reduce((acc, [key, value]) => { if (typeof value === "object") { if (JSON.stringify(value) === JSON.stringify(state[key])) { return acc; } } if (value === state[key]) { return acc; } return { ...acc, [key]: value }; }, {}); exports.compareStateWithStore = compareStateWithStore;