# dynamo-iterator

> Iterator pattern applied to AWS Dynamo searches

Latest version **3.2.0** (published 2021-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install dynamo-iterator
pnpm add dynamo-iterator
yarn add dynamo-iterator
bun add dynamo-iterator
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2021-10-11 |
| First published | 2019-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.17.0 |
| Dependencies | 0 |
| Unpacked size | 25.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aitor Guerrero |
| Maintainers | aitor.guerrero |

## Links

- npm: https://www.npmjs.com/package/dynamo-iterator
- Repository: git@github.com:AitorGuerrero/dynamo-iterator
- npm.io page: https://npm.io/package/dynamo-iterator

## Recent versions

- 3.2.0 (latest) — 2021-10-11
- 3.1.0 — 2021-10-11
- 3.0.0 — 2021-09-06
- 2.0.0 — 2021-05-19
- 1.1.6 — 2021-05-18
- 1.1.4 — 2020-12-30
- 1.1.3 — 2020-05-06
- 1.1.2 — 2019-12-03
- 1.1.1 — 2019-12-03
- 1.1.0 — 2019-12-03
- 1.0.3 — 2019-12-02
- 1.0.2 — 2019-11-29
- 1.0.1 — 2019-11-27
- 1.0.0 — 2019-11-27

## README

# Dynamo Iterator
A utility class to iterate Dynamo searches. When iterating, it loads results by demand, and manages batches logic. 

## Getting started
- Installation ```npm install dynamo-iterator```
- Making a query:
```
import DynamoIteratorFactory from 'dynamo-iterator';

const items = DynamoIteratorFactory.query({
  TableName: 'my-table',
  KeyConditionExpression: 'id=:id',
  ExpressionAttributeValues: {'id': 'myId'}, 
});

for await (const item of items) {
  ...
}
```

## Changelog
- 2.0.0 Async Iterator implementation.
  - Features:
    - ```for await (const item of generator) { ... }``` form can be used
    - There is no need to precharge the generator.
  - Breaking changes:
    - Exported class is named ```DynamoIteratorFactory```
    - ```DynamoIteratorFactory.preload``` method removed, as it is not needed.

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