# noloopfor

> Pacote para fazer loops sem o uso de for

Latest version **2.0.8** (published 2021-03-28) · MIT license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.8 |
| Published | 2021-03-28 |
| First published | 2020-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/noloopfor) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | davidfernando |
| Maintainers | david-fernando |
| Keywords | for, js, JavaScript, Javascript, No for loop, NoForLoop, NoLoopFor, No loop for, Noloopfor, functional, functional programming, programming functional, programação funcional, Without for, Without for loop, Without loop for, data immutability, immutability, imutabilidade, imutabilidade dos dados, functional JavaScript, functional JS, JavaScript functional, JS functional |

## Links

- npm: https://www.npmjs.com/package/noloopfor
- Repository: https://github.com/david-fernando/noLoopFor
- Issues: https://github.com/david-fernando/noLoopFor/issues
- npm.io page: https://npm.io/package/noloopfor

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.8 (latest) — 2021-03-28
- 2.0.7 — 2021-03-21
- 2.0.6 — 2021-03-21
- 2.0.5 — 2021-03-14
- 2.0.4 — 2021-03-14
- 2.0.3 — 2021-02-18
- 2.0.2 — 2021-02-18
- 2.0.1 — 2021-02-18
- 2.0.0 — 2021-02-18
- 1.0.10 — 2020-07-03
- 1.0.9 — 2020-07-03
- 1.0.8 — 2020-07-03
- 1.0.7 — 2020-07-03
- 1.0.6 — 2020-07-03
- 1.0.5 — 2020-07-01
- … 5 more at https://npm.io/package/noloopfor/versions

## README

<p align="center">
  <a href="" rel="noopener">
 <img width=200px height=200px src="https://images2.imgbox.com/23/40/erCGj2jK_o.png" alt="No loop for"></a>
</p>

<h1 align="center">No loop for</h1>

<div align="center">
  
![GitHub top language](https://img.shields.io/github/languages/top/david-fernando/noLoopFor) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/f39ced0748b84cf181d948c33dd510e2)](https://www.codacy.com/manual/david-fernando/noLoopFor?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=david-fernando/noLoopFor&amp;utm_campaign=Badge_Grade) [![GitHub license](https://img.shields.io/github/license/david-fernando/noLoopFor)](https://github.com/david-fernando/noLoopFor/blob/master/LICENSE)

</li>
</div>

---


### Languages
<ul style="display:inline; list-style-type:none">
  <li style="list-style-type:none"><a href="https://github.com/david-fernando/noLoopFor/blob/master/LEIAME.md">Portuguese</li>
  <li style="list-style-type:none"><a href="#">English</li>
</ul>

### About
JavaScript library for making functional loops

### Get Started

  - <h4>On the Node JS</h4>
  To install on the node, just execute the command below on the terminal
  ```
  npm install noloopfor
  ```
  To import the the desired function use destructuring assignment, for example, the bellow code is importing the function loop.
  ```javascript
  const { loop } = require('noloopfor')
  ```
  If using React JS, or some other JS library that allows you to use the ESM syntax, you can use it with destructuring assignment, as in the example below
  ```javascript
  import { loop } from 'noloopfor'
  ```
 - <h4>On the browser</h4>
  If you're out of Node JS you don't need to install anything, just import the desired function using ESM syntax, for example, the below code is importing the function loop, and then is implementing the same.
  
  ```html
  <script type="module">
  import { loop } from 'https://cdn.jsdelivr.net/gh/david-fernando/noForLoop/dist/noforloop.js'

  const number = 10

  loop(number, 20, (iterations)=>{
   console.log(iterations)
  })

  </script>
  ```

  - <h4>With TypeScript</h4>
  To use it with TypeScript, just install the TypeScript declarations with one of the commands below
  ```javascript
  npm install @types/noloopfor

  // or

  yarn add @types/noloopfor

  ```
### Reference

### loop
   - <h4>Syntax</h4>
  ```javascript
  loop(number, numberOfIterations, callback)
  ```
  - <h4>Example</h4>
  ```javascript
  const number = 10
  loop(number, 20, (iterations)=>{
   console.log(iterations)
  })
  ```
### loopStep
   - <h4>Syntax</h4>
  ```javascript
  loopStep(number, numberOfIterations, numberStep, callback)
  ```
  - <h4>Example</h4>
  ```javascript
  const number = 10
  loopStep(number, 100, 10, (iterations)=>{
   console.log(iterations)
  })
  ```
  

### decrementLoop
   - <h4>Syntax</h4>
  ```javascript
  decrementLoop(number, numberTarget, callback)
  ```
  - <h4>Example</h4>
  ```javascript
  const number = 10
  decrementLoop(number, 1, (iterations)=>{
   console.log(iterations)
  })
  ```
  
### decrementStep
   - <h4>Syntax</h4>
  ```javascript
  decrementStep(number, numberTarget, numberStep, callback)
  ```
  - <h4>Example</h4>
  ```javascript
  const number = 20
  decrementStep(number, 10, 1, (iterations)=>{
   console.log(iterations)
  })
  ```

### Licence:
MIT

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