Files
backup-tool/frontend/node_modules/recharts/lib/util/payload/getUniqPayload.js
T
alex d3b92593d5 feat(frontend): add API client, layout, and routing
- Create Axios-based API client with sources, jobs, and dashboard endpoints
- Add responsive Layout component with navigation sidebar
- Set up React Router with Dashboard, Backups, and Settings routes
- Configure TanStack Query provider with default options
- Use lucide-react for navigation icons
2026-05-11 21:47:20 +02:00

26 lines
866 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getUniqPayload = getUniqPayload;
var _uniqBy = _interopRequireDefault(require("lodash/uniqBy"));
var _isFunction = _interopRequireDefault(require("lodash/isFunction"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* This is configuration option that decides how to filter for unique values only:
*
* - `false` means "no filter"
* - `true` means "use recharts default filter"
* - function means "use return of this function as the default key"
*/
function getUniqPayload(payload, option, defaultUniqBy) {
if (option === true) {
return (0, _uniqBy["default"])(payload, defaultUniqBy);
}
if ((0, _isFunction["default"])(option)) {
return (0, _uniqBy["default"])(payload, option);
}
return payload;
}