https://github.com/iterable-iterator/cycle
:juggling_person: Iterable cycling functions for JavaScript
https://github.com/iterable-iterator/cycle
Last synced: 1 day ago
JSON representation
:juggling_person: Iterable cycling functions for JavaScript
- Host: GitHub
- URL: https://github.com/iterable-iterator/cycle
- Owner: iterable-iterator
- License: agpl-3.0
- Created: 2021-04-27T14:06:06.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-08-19T19:49:50.000Z (10 months ago)
- Last Synced: 2025-11-23T08:13:50.303Z (6 months ago)
- Language: JavaScript
- Homepage: https://iterable-iterator.github.io/cycle
- Size: 2.01 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
:juggling_person: [@iterable-iterator/cycle](https://iterable-iterator.github.io/cycle)
==
Iterable cycling functions for JavaScript.
See [docs](https://iterable-iterator.github.io/cycle/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 {cycle, ncycle} from '@iterable-iterator/cycle';
cycle( "AB" ) ; // A B A B A B ...
ncycle( "AB" , 3 ) ; // A B A B A B
import {chain} from '@iterable-iterator/chain';
cycle( chain( [ 0 , 1 , 2 ] , [ 3 , 4 , 5 ] ) ) ; // 0 1 2 3 4 5 0 1 ...
```
[](https://raw.githubusercontent.com/iterable-iterator/cycle/main/LICENSE)
[](https://www.npmjs.org/package/@iterable-iterator/cycle)
[](https://github.com/iterable-iterator/cycle/actions/workflows/ci.yml?query=branch:main)
[](https://github.com/iterable-iterator/cycle/network/dependencies)
[](https://github.com/iterable-iterator/cycle/issues)
[](https://www.npmjs.org/package/@iterable-iterator/cycle)
[](https://codeclimate.com/github/iterable-iterator/cycle/issues)
[](https://codeclimate.com/github/iterable-iterator/cycle/trends/churn)
[](https://codecov.io/gh/iterable-iterator/cycle)
[](https://codeclimate.com/github/iterable-iterator/cycle/trends/technical_debt)
[](https://iterable-iterator.github.io/cycle/source.html)
[](https://bundlephobia.com/result?p=@iterable-iterator/cycle)