source: node_modules/es-toolkit/dist/compat/object/forIn.mjs@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 356 bytes
Line 
1import { identity } from '../../function/identity.mjs';
2
3function forIn(object, iteratee = identity) {
4 if (object == null) {
5 return object;
6 }
7 for (const key in object) {
8 const result = iteratee(object[key], key, object);
9 if (result === false) {
10 break;
11 }
12 }
13 return object;
14}
15
16export { forIn };
Note: See TracBrowser for help on using the repository browser.