Files
url_tracker_tool/node_modules/@chakra-ui/utils/dist/esm/walk-object.mjs
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

24 lines
649 B
JavaScript

import { isObject } from './is.mjs';
function walkObject(target, predicate, options = {}) {
const { stop, getKey } = options;
function inner(value, path = []) {
if (isObject(value) || Array.isArray(value)) {
const result = {};
for (const [prop, child] of Object.entries(value)) {
const key = getKey?.(prop) ?? prop;
const childPath = [...path, key];
if (stop?.(value, childPath)) {
return predicate(value, path);
}
result[key] = inner(child, childPath);
}
return result;
}
return predicate(value, path);
}
return inner(target);
}
export { walkObject };