iterable-iterator/count

View on GitHub
README.md

Summary

Maintainability
Test Coverage
:sheep: [@iterable-iterator/count](https://iterable-iterator.github.io/count)
==

A counting function for JavaScript.
See [docs](https://iterable-iterator.github.io/count/index.html).

> :warning: Depending on your environment, the code may require
> `regeneratorRuntime` to be defined, for instance by importing
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).

```js
import {count} from '@iterable-iterator/count';
for (const i of count()) console.log(i); // 0 1 2 3 4 ...
count(2, 3); // 2 5 8 11 14 ...
```

[![License](https://img.shields.io/github/license/iterable-iterator/count.svg)](https://raw.githubusercontent.com/iterable-iterator/count/main/LICENSE)
[![Version](https://img.shields.io/npm/v/@iterable-iterator/count.svg)](https://www.npmjs.org/package/@iterable-iterator/count)
[![Tests](https://img.shields.io/github/actions/workflow/status/iterable-iterator/count/ci.yml?branch=main&event=push&label=tests)](https://github.com/iterable-iterator/count/actions/workflows/ci.yml?query=branch:main)
[![Dependencies](https://img.shields.io/librariesio/github/iterable-iterator/count.svg)](https://github.com/iterable-iterator/count/network/dependencies)
[![GitHub issues](https://img.shields.io/github/issues/iterable-iterator/count.svg)](https://github.com/iterable-iterator/count/issues)
[![Downloads](https://img.shields.io/npm/dm/@iterable-iterator/count.svg)](https://www.npmjs.org/package/@iterable-iterator/count)

[![Code issues](https://img.shields.io/codeclimate/issues/iterable-iterator/count.svg)](https://codeclimate.com/github/iterable-iterator/count/issues)
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/iterable-iterator/count.svg)](https://codeclimate.com/github/iterable-iterator/count/trends/churn)
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/iterable-iterator/count/main.svg)](https://codecov.io/gh/iterable-iterator/count)
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/iterable-iterator/count.svg)](https://codeclimate.com/github/iterable-iterator/count/trends/technical_debt)
[![Documentation](https://iterable-iterator.github.io/count/badge.svg)](https://iterable-iterator.github.io/count/source.html)
[![Package size](https://img.shields.io/bundlephobia/minzip/@iterable-iterator/count)](https://bundlephobia.com/result?p=@iterable-iterator/count)