# flatterator

> make an iterator linearly passing through the elements of the array and inside the indicated by the parameter of their nested structures

Latest version **1.0.0** (published 2019-12-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install flatterator
pnpm add flatterator
yarn add flatterator
bun add flatterator
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-12-29 |
| First published | 2019-12-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ivan Sysoev |
| Maintainers | ocoka |
| Keywords | utility, array, small, iterator, nested, structure, library |

## Links

- npm: https://www.npmjs.com/package/flatterator
- Repository: https://github.com/ocoka/flatterator
- Homepage: https://github.com/ocoka/flatterator#readme
- Issues: https://github.com/ocoka/flatterator/issues
- npm.io page: https://npm.io/package/flatterator

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-12-29

## README

## It just can iterate over array where items can itself has a children so it make it in flatten way

```javascript
const flatterator = require('flatterator).flatterator;
const data = [
  {
    a: 1
  },
  {
    a: 2
  },
  {
    a: 3,
    someChild: [
      {
        a: 4
      }
    ]
  }
];
for (const i of flatterator(data, 'someChild' /* or array of props to be visited*/) {
  console.log( i.a ); /* 1, 2 , 3, 4 will be printed*/
}
```

---
_Source: https://npm.io/package/flatterator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
