source: node_modules/es-toolkit/dist/compat/object/forOwn.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: 481 bytes
Line 
1import { keys } from './keys.mjs';
2import { identity } from '../../function/identity.mjs';
3
4function forOwn(object, iteratee = identity) {
5 if (object == null) {
6 return object;
7 }
8 const iterable = Object(object);
9 const keys$1 = keys(object);
10 for (let i = 0; i < keys$1.length; ++i) {
11 const key = keys$1[i];
12 if (iteratee(iterable[key], key, iterable) === false) {
13 break;
14 }
15 }
16 return object;
17}
18
19export { forOwn };
Note: See TracBrowser for help on using the repository browser.