UNPKG

@modern-kit/utils

Version:
15 lines (13 loc) 307 B
function findLastKey(obj, condition) { const keys = Object.keys(obj); for (let i = keys.length - 1; i >= 0; i--) { const key = keys[i]; const value = obj[key]; if (condition(value)) { return key; } } return void 0; } export { findLastKey }; //# sourceMappingURL=index.mjs.map