|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
459 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|---|
| 4 |
|
|---|
| 5 | const identity = require('../../function/identity.js');
|
|---|
| 6 |
|
|---|
| 7 | function forIn(object, iteratee = identity.identity) {
|
|---|
| 8 | if (object == null) {
|
|---|
| 9 | return object;
|
|---|
| 10 | }
|
|---|
| 11 | for (const key in object) {
|
|---|
| 12 | const result = iteratee(object[key], key, object);
|
|---|
| 13 | if (result === false) {
|
|---|
| 14 | break;
|
|---|
| 15 | }
|
|---|
| 16 | }
|
|---|
| 17 | return object;
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | exports.forIn = forIn;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.