# foreach-sync-callback

> forEach sync callback function

Latest version **1.0.3** (published 2022-08-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install foreach-sync-callback
pnpm add foreach-sync-callback
yarn add foreach-sync-callback
bun add foreach-sync-callback
```

## 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 | 1.0.3 |
| Published | 2022-08-19 |
| First published | 2022-08-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Raumik Rana |
| Maintainers | ranaraumik16 |
| Keywords | sync, syncCallback, syncForEach |

## Links

- npm: https://www.npmjs.com/package/foreach-sync-callback
- npm.io page: https://npm.io/package/foreach-sync-callback

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2022-08-19
- 1.0.2 — 2022-08-19
- 1.0.1 — 2022-08-19
- 1.0.0 — 2022-08-19

## README

# for-each-sync-callback
    - This npm module provides you synchronize callback forEach function

# Install
    - npm install foreach-sync-callback

# Test

```
const forEachSyncCallBack = require('foreach-sync-callback')

let arr = [1, 2, 3, 4, 5, 6, 7]

// You have to pass array and callback function into this function
// Callback function has parameter in below sequence
// 1. res 2. element 3. element Index 4. array
forEachSyncCallBack(arr, (res, e, i) => {
    // Adding time out to check sync forEach

    setTimeout(() => {

        console.log(e)

        //You must have to call "res()" at end of your callback function
        res()
    }, 1000);
})

// Function will print all element one by one in console after 1 sec
```

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